All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Srinivas Neeli <srinivas.neeli@xilinx.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"michal.simek@xilinx.com" <michal.simek@xilinx.com>,
	"shubhrajyoti.datta@xilinx.com" <shubhrajyoti.datta@xilinx.com>,
	"sgoud@xilinx.com" <sgoud@xilinx.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"git@xilinx.com" <git@xilinx.com>
Subject: Re: [PATCH 1/3] gpio: zynq: use module_platform_driver to simplify the code
Date: Tue, 13 Apr 2021 12:43:48 +0200	[thread overview]
Message-ID: <CAMpxmJW=HWf_NxGpfBkX=utgOTs4+6RtypxnKGtpuYnX=t8rGQ@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Vddd6ygr4mJ9Z+SuGZmfLcgDLWLZaxby2XE2mX8War-qQ@mail.gmail.com>

On Sat, Apr 10, 2021 at 12:08 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
>
>
> On Friday, April 9, 2021, Srinivas Neeli <srinivas.neeli@xilinx.com> wrote:
>>
>> module_platform_driver() makes the code simpler by eliminating
>> boilerplate code.
>>
>> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
>> ---
>>  drivers/gpio/gpio-zynq.c | 17 +----------------
>>  1 file changed, 1 insertion(+), 16 deletions(-)
>>
>> diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
>> index 3521c1dc3ac0..bb1ac0c5cf26 100644
>> --- a/drivers/gpio/gpio-zynq.c
>> +++ b/drivers/gpio/gpio-zynq.c
>> @@ -1020,22 +1020,7 @@ static struct platform_driver zynq_gpio_driver = {
>>         .remove = zynq_gpio_remove,
>>  };
>>
>> -/**
>> - * zynq_gpio_init - Initial driver registration call
>> - *
>> - * Return: value from platform_driver_register
>> - */
>> -static int __init zynq_gpio_init(void)
>> -{
>> -       return platform_driver_register(&zynq_gpio_driver);
>> -}
>> -postcore_initcall(zynq_gpio_init);
>
>
>
> It’s not an equivalent. Have you tested on actual hardware? If no, there is no go for this change.
>

Yep, this has been like this since the initial introduction of this
driver. Unfortunately there's no documented reason so unless we can
test it, it has to stay this way.

Bartosz

WARNING: multiple messages have this Message-ID (diff)
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Srinivas Neeli <srinivas.neeli@xilinx.com>,
	 "linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	 "michal.simek@xilinx.com" <michal.simek@xilinx.com>,
	 "shubhrajyoti.datta@xilinx.com" <shubhrajyoti.datta@xilinx.com>,
	"sgoud@xilinx.com" <sgoud@xilinx.com>,
	 "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	 "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"git@xilinx.com" <git@xilinx.com>
Subject: Re: [PATCH 1/3] gpio: zynq: use module_platform_driver to simplify the code
Date: Tue, 13 Apr 2021 12:43:48 +0200	[thread overview]
Message-ID: <CAMpxmJW=HWf_NxGpfBkX=utgOTs4+6RtypxnKGtpuYnX=t8rGQ@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Vddd6ygr4mJ9Z+SuGZmfLcgDLWLZaxby2XE2mX8War-qQ@mail.gmail.com>

On Sat, Apr 10, 2021 at 12:08 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
>
>
> On Friday, April 9, 2021, Srinivas Neeli <srinivas.neeli@xilinx.com> wrote:
>>
>> module_platform_driver() makes the code simpler by eliminating
>> boilerplate code.
>>
>> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
>> ---
>>  drivers/gpio/gpio-zynq.c | 17 +----------------
>>  1 file changed, 1 insertion(+), 16 deletions(-)
>>
>> diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
>> index 3521c1dc3ac0..bb1ac0c5cf26 100644
>> --- a/drivers/gpio/gpio-zynq.c
>> +++ b/drivers/gpio/gpio-zynq.c
>> @@ -1020,22 +1020,7 @@ static struct platform_driver zynq_gpio_driver = {
>>         .remove = zynq_gpio_remove,
>>  };
>>
>> -/**
>> - * zynq_gpio_init - Initial driver registration call
>> - *
>> - * Return: value from platform_driver_register
>> - */
>> -static int __init zynq_gpio_init(void)
>> -{
>> -       return platform_driver_register(&zynq_gpio_driver);
>> -}
>> -postcore_initcall(zynq_gpio_init);
>
>
>
> It’s not an equivalent. Have you tested on actual hardware? If no, there is no go for this change.
>

Yep, this has been like this since the initial introduction of this
driver. Unfortunately there's no documented reason so unless we can
test it, it has to stay this way.

Bartosz

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-04-13 10:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 14:08 [PATCH 0/3] gpio: zynq: Update on gpio zynq driver Srinivas Neeli
2021-04-09 14:08 ` Srinivas Neeli
2021-04-09 14:08 ` [PATCH 1/3] gpio: zynq: use module_platform_driver to simplify the code Srinivas Neeli
2021-04-09 14:08   ` Srinivas Neeli
     [not found]   ` <CAHp75Vddd6ygr4mJ9Z+SuGZmfLcgDLWLZaxby2XE2mX8War-qQ@mail.gmail.com>
2021-04-13 10:43     ` Bartosz Golaszewski [this message]
2021-04-13 10:43       ` Bartosz Golaszewski
2021-04-14 14:45       ` Srinivas Neeli
2021-04-14 14:45         ` Srinivas Neeli
2021-04-16 18:27         ` Bartosz Golaszewski
2021-04-16 18:27           ` Bartosz Golaszewski
2021-04-17 11:06           ` Andy Shevchenko
2021-04-17 11:06             ` Andy Shevchenko
2021-06-14 10:39           ` Srinivas Neeli
2021-06-14 10:39             ` Srinivas Neeli
2021-06-14 18:22             ` Bartosz Golaszewski
2021-06-14 18:22               ` Bartosz Golaszewski
2021-04-09 14:08 ` [PATCH 2/3] gpio: zynq: Check return value of pm_runtime_get_sync Srinivas Neeli
2021-04-09 14:08   ` Srinivas Neeli
2021-04-09 14:08 ` [PATCH 3/3] gpio: zynq: Check return value of irq_get_irq_data Srinivas Neeli
2021-04-09 14:08   ` Srinivas Neeli
2021-04-17 18:02   ` Deepak R Varma
2021-04-17 18:02     ` Deepak R Varma

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='CAMpxmJW=HWf_NxGpfBkX=utgOTs4+6RtypxnKGtpuYnX=t8rGQ@mail.gmail.com' \
    --to=bgolaszewski@baylibre.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=git@xilinx.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=sgoud@xilinx.com \
    --cc=shubhrajyoti.datta@xilinx.com \
    --cc=srinivas.neeli@xilinx.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.