Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1983612pxk; Mon, 14 Sep 2020 01:15:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3PCLRnrrF3cWzel1KPo/sJcSVrHOGLruXP7EY+xyGWuO4UHKl5J/F74PYgMsbHKehRlV5 X-Received: by 2002:a17:906:364b:: with SMTP id r11mr13240884ejb.48.1600071356058; Mon, 14 Sep 2020 01:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600071356; cv=none; d=google.com; s=arc-20160816; b=N0gQiH0p3yHo5niaMdzWHWMQzZf6N7e3kcEzF1SnRZkyygViqYYYZ76i9NUNTeS/nh HoJA4tS5+QqV+hbvwfs0Xk2+UswkD3FNeAXe5hyguWwJdNMgt3wErF1s+ZQXO/EMxG0b uPvzEt2SSFweB0x9B8Sa/Lrb8noG+PJk0uSVQLrbGZU5d/ptjq3gXUKkVvmWlDP3k7mJ /TmgTXnOsr1KyAQW25ViIny87bhnszkZtuLrLOMhbVLsVFbh5c2RDba2t5SY37809OSn LdCW3kWnvj1nO5vpCTuOdFxhCfSqGr8IFIQbm6XZTZk1hkpBXbuoAPIP4rMV+zZ/K5TO CdtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Nl/00HUyr8Wq28pXUoEd3YsEKDmjzTKBgf6RHxEgN2w=; b=qHcWSYiMyZ0edsPYDNpNIbFd7yD9ZlHR0emXOy6pdOxW80JsHCSltYihDs0PhM7bR4 a3DY5laijwUWWTIanJaA82ueXzkXJjogEnIxVYJh7MPINBdu5MSWg/69DGuJvIzxZs16 ZTM5zRtxeNawaNeWOvnTZDRIzgDzNqiEcNdOgS7GdJCWZf8QkJAU7Yjpe8nbgEK1n98g kKvqujwr5+T0iKPRgO5yM97E9u5CrBALRTZFQDXT22dkVs7JMNfHaKte4Z3USwHPCev+ c26A1P3/cXrYZfLqhaoLWFeUwv0qMyar96GEpIB1mcxwpkx/xKbdcnvdNXbIM+d3acwv QAzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ONIEbqQN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j16si7619438edj.408.2020.09.14.01.15.33; Mon, 14 Sep 2020 01:15:56 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ONIEbqQN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726266AbgININ1 (ORCPT + 99 others); Mon, 14 Sep 2020 04:13:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbgINIM5 (ORCPT ); Mon, 14 Sep 2020 04:12:57 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68607C061788; Mon, 14 Sep 2020 01:12:57 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id z1so17630178wrt.3; Mon, 14 Sep 2020 01:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Nl/00HUyr8Wq28pXUoEd3YsEKDmjzTKBgf6RHxEgN2w=; b=ONIEbqQNIppWr9sMLWIk0/uNv3NAhbGE0+Tp3USoCkWyinCG4kPTxww4R2hVG/mKQH M2ndIJGX5qT1yqbd2sWlpJ1JPHngxo1FICW+iAyG4zcZZplybqFDwamWYeKWznidLGEN HJ+gJesXp1pLvqItytWKtWxVw0F3a67kqlk4X0lLVQRYmjzJjq3UsvbKWtR2b/WXJntU PDrP2MzwvVX3Xk/MJ5ipt5lu21hujZwUmN63JRsINpaIX72r8Su+8kp8648y4dSO+laW d2w3jrBvkLgkcXAHsj3q7r/cn9j5Cx86xxXxoVdcvxewcGZUn1e295QOHoqQLF4ZlTig 89qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Nl/00HUyr8Wq28pXUoEd3YsEKDmjzTKBgf6RHxEgN2w=; b=FiloWwikFb5gc+853cDHiEGxOfCBYsyhpQrjVGzH59QlNocf726GH3K3HxCW+Y/2Gx P72JfMNDcC4INh5ZnBlCPPhVwdAtTIfhiurAprdFLhquSeXhmARQPQjyw+aFGWNJwDi0 kSmIsx/bMxJY21SHT4C356CWcqa08VPxArOUXAIPrnFiKTgOwMmUoOZuziIiR2cT42mS d9ylbRJGN9T/UoOmVl7j5UjkpxnczTGZTjmrcZxHJnebXsWhJhci04OQws4M4MlO0jOz jkT+Xe2WGw9WRa323C5624IbxDgL1UigIo8wcXZCFHYZ4aVUB1exzpMAB0fvsIySZg0H rUww== X-Gm-Message-State: AOAM530V5Qlj3mLbpYqdfaq1l+M8hYTWb+j9NbSOheXZ+369ZMVw2Q9e Or/eU2um3JscgwaeQzvgOGQwj2s4TbewJTkxyFc= X-Received: by 2002:a5d:67d0:: with SMTP id n16mr15768211wrw.198.1600071175710; Mon, 14 Sep 2020 01:12:55 -0700 (PDT) MIME-Version: 1.0 References: <20200914065402.3726408-1-liushixin2@huawei.com> In-Reply-To: <20200914065402.3726408-1-liushixin2@huawei.com> From: Chunyan Zhang Date: Mon, 14 Sep 2020 16:12:19 +0800 Message-ID: Subject: Re: [PATCH -next] pinctrl: sprd: use module_platform_driver to simplify the code To: Liu Shixin Cc: Linus Walleij , Orson Zhai , Baolin Wang , linux-gpio@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Sep 2020 at 14:32, Liu Shixin wrote: > > module_platform_driver() makes the code simpler by eliminating > boilerplate code. > > Signed-off-by: Liu Shixin Acked-by: Chunyan Zhang Thanks, Chunyan > --- > 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 >