Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1941764pxk; Sun, 13 Sep 2020 23:34:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSzPRVodseQ4XAHhoAVI8MPHt03IINEciuf6/nqdUJDG5qlJziGRwhd0Omi7LwahKfMIP8 X-Received: by 2002:a17:906:77d1:: with SMTP id m17mr13420157ejn.96.1600065291560; Sun, 13 Sep 2020 23:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600065291; cv=none; d=google.com; s=arc-20160816; b=exq2i4z62hRi3BKBwAEI5FtSM//N6UV06t9PeZbwtc2tgK+9e/erqinqCaQzPL993k BIyfxEfHq808Zedsf/69U5FuFp8ddnOWzwyLbWhpr22tLjo1eqjmnkcl9Vj2tW12YqYg 56k7lEPqU/TIxdseOymBgwrEhQX1V1PHzpUngjG9FYkEKvSfhs2dqLq8xBifpJmqF9oB HMGtDMa1wkee3r1o8MTTuv+1kL3WD+8YWOlK6Hth1vIGjceuMpO8NcRUzQmvOcWjw4OV N7GCE+aIwWl16T3SP15sKAnLrPhM94xGxnCscwE8VNbYxAbaOU09badaszy/OEwkfF6V JXug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=AZG8+hs9nXEAuZdfUp0G59vt6192kex3e73quaoi0wY=; b=xafCkzhNOXfIu8PWImKa2G2C2vMrYh+Rj2F30E3n4s+TTpXHB/jvYi19BXIz8rvKL1 h0wbNmZIx8ygO8goPE+w449veWbCHd4ojN9n8ks9ZJs0zsrynlXB5mMXQwUMz9htvcRL oVOiX5G4hoBA9jv1zK6vNp85G6f6D5yBBHtr1gALnkDRopPQK9sZ40V1RjU9E/WtcoW0 NoE/qstk973lfpIsUcOSMbr0WglfdqDHIvYD5zgETIMfynknSekS+p75yDRNA/j11Hfi TzNw+KYXz9VJzipTt8OS/+px7xBTQyqUPQ012qlzqLyMA1WXwIje4jxeX5TrfwEkJwad tLRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gv22si6520776ejb.536.2020.09.13.23.34.29; Sun, 13 Sep 2020 23:34:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726110AbgINGbm (ORCPT + 99 others); Mon, 14 Sep 2020 02:31:42 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:11830 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726098AbgINGbh (ORCPT ); Mon, 14 Sep 2020 02:31:37 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E34E6C0B2D3D50EC1778; Mon, 14 Sep 2020 14:31:33 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Mon, 14 Sep 2020 14:31:22 +0800 From: Liu Shixin To: Linus Walleij , Orson Zhai , Baolin Wang , Chunyan Zhang CC: , , Liu Shixin Subject: [PATCH -next] pinctrl: sprd: use module_platform_driver to simplify the code Date: Mon, 14 Sep 2020 14:54:02 +0800 Message-ID: <20200914065402.3726408-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin --- drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c b/drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c index 06c8671b40e7..d14f382f2392 100644 --- a/drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c +++ b/drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c @@ -946,18 +946,7 @@ static struct platform_driver sprd_pinctrl_driver = { .remove = sprd_pinctrl_remove, .shutdown = sprd_pinctrl_shutdown, }; - -static int sprd_pinctrl_init(void) -{ - return platform_driver_register(&sprd_pinctrl_driver); -} -module_init(sprd_pinctrl_init); - -static void sprd_pinctrl_exit(void) -{ - platform_driver_unregister(&sprd_pinctrl_driver); -} -module_exit(sprd_pinctrl_exit); +module_platform_driver(sprd_pinctrl_driver); MODULE_DESCRIPTION("SPREADTRUM Pin Controller Driver"); MODULE_AUTHOR("Baolin Wang "); -- 2.25.1