All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Liu Shixin <liushixin2@huawei.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>, <linux-iio@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] iio: adc: palmas_gpadc: use module_platform_driver to simplify the code
Date: Wed, 16 Sep 2020 19:10:26 +0100	[thread overview]
Message-ID: <20200916191026.56932e1c@archlinux> (raw)
In-Reply-To: <20200914065401.3726354-1-liushixin2@huawei.com>

On Mon, 14 Sep 2020 14:54:01 +0800
Liu Shixin <liushixin2@huawei.com> wrote:

> module_platform_driver() makes the code simpler by eliminating
> boilerplate code.
> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to see if we missed anything.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/palmas_gpadc.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
> index 1ca6570be66a..889b88768b63 100644
> --- a/drivers/iio/adc/palmas_gpadc.c
> +++ b/drivers/iio/adc/palmas_gpadc.c
> @@ -834,18 +834,7 @@ static struct platform_driver palmas_gpadc_driver = {
>  		.of_match_table = of_palmas_gpadc_match_tbl,
>  	},
>  };
> -
> -static int __init palmas_gpadc_init(void)
> -{
> -	return platform_driver_register(&palmas_gpadc_driver);
> -}
> -module_init(palmas_gpadc_init);
> -
> -static void __exit palmas_gpadc_exit(void)
> -{
> -	platform_driver_unregister(&palmas_gpadc_driver);
> -}
> -module_exit(palmas_gpadc_exit);
> +module_platform_driver(palmas_gpadc_driver);
>  
>  MODULE_DESCRIPTION("palmas GPADC driver");
>  MODULE_AUTHOR("Pradeep Goudagunta<pgoudagunta@nvidia.com>");


      reply	other threads:[~2020-09-16 18:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14  6:54 [PATCH -next] iio: adc: palmas_gpadc: use module_platform_driver to simplify the code Liu Shixin
2020-09-16 18:10 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200916191026.56932e1c@archlinux \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liushixin2@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.