diff mbox series

[1/6] nand: davinci: rename the platform driver

Message ID 20180216164712.25898-2-brgl@bgdev.pl
State Changes Requested
Headers show
Series ARM: davinci: remove the mach-specific aemif driver - part 1 | expand

Commit Message

Bartosz Golaszewski Feb. 16, 2018, 4:47 p.m. UTC
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Commit d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock
lookup table") broke the nand support in board file mode for
da850-based boards. Instead of reverting it and breaking the DT users
in the process (due to clock lookup), rename the driver to match the
clock table before renaming the users.

Fixes: d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock lookup table")
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/mtd/nand/davinci_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Boris Brezillon Feb. 16, 2018, 6:31 p.m. UTC | #1
Hi Bartosz

Prefix should be "mtd: nand: davinci:"

On Fri, 16 Feb 2018 17:47:07 +0100
Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Commit d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock
> lookup table") broke the nand support in board file mode for
> da850-based boards. Instead of reverting it and breaking the DT users
> in the process (due to clock lookup), rename the driver to match the
> clock table before renaming the users.
> 
> Fixes: d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock lookup table")

You probably want Cc: <stable@vger.kernel.org> here.

> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  drivers/mtd/nand/davinci_nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
> index ccc8c43abcff..4fb143bf1872 100644
> --- a/drivers/mtd/nand/davinci_nand.c
> +++ b/drivers/mtd/nand/davinci_nand.c
> @@ -865,7 +865,7 @@ static struct platform_driver nand_davinci_driver = {
>  	.probe		= nand_davinci_probe,
>  	.remove		= nand_davinci_remove,
>  	.driver		= {
> -		.name	= "davinci_nand",
> +		.name	= "davinci-nand",

And by doing that you're breaking C board files which are using the
name with an underscore.

>  		.of_match_table = of_match_ptr(davinci_nand_of_match),
>  	},
>  };

Regards,

Boris
Boris Brezillon Feb. 16, 2018, 7:19 p.m. UTC | #2
On Fri, 16 Feb 2018 17:47:07 +0100
Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Commit d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock
> lookup table") broke the nand support in board file mode for
> da850-based boards. Instead of reverting it and breaking the DT users
> in the process (due to clock lookup), rename the driver to match the
> clock table before renaming the users.
> 
> Fixes: d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock lookup table")
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  drivers/mtd/nand/davinci_nand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
> index ccc8c43abcff..4fb143bf1872 100644
> --- a/drivers/mtd/nand/davinci_nand.c
> +++ b/drivers/mtd/nand/davinci_nand.c
> @@ -865,7 +865,7 @@ static struct platform_driver nand_davinci_driver = {
>  	.probe		= nand_davinci_probe,
>  	.remove		= nand_davinci_remove,
>  	.driver		= {
> -		.name	= "davinci_nand",
> +		.name	= "davinci-nand",

Another side-effect of this change you should be aware of: by doing
that you also break all users that were defining partitions through the
cmdline using mtdparts=davinci_nand.0:<part-layout>.

Not sure this is a good idea ;-).

>  		.of_match_table = of_match_ptr(davinci_nand_of_match),
>  	},
>  };
David Lechner Feb. 16, 2018, 7:22 p.m. UTC | #3
On 02/16/2018 01:19 PM, Boris Brezillon wrote:
> On Fri, 16 Feb 2018 17:47:07 +0100
> Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> 
>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>
>> Commit d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock
>> lookup table") broke the nand support in board file mode for
>> da850-based boards. Instead of reverting it and breaking the DT users
>> in the process (due to clock lookup), rename the driver to match the
>> clock table before renaming the users.
>>
>> Fixes: d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock lookup table")
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>> ---
>>   drivers/mtd/nand/davinci_nand.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
>> index ccc8c43abcff..4fb143bf1872 100644
>> --- a/drivers/mtd/nand/davinci_nand.c
>> +++ b/drivers/mtd/nand/davinci_nand.c
>> @@ -865,7 +865,7 @@ static struct platform_driver nand_davinci_driver = {
>>   	.probe		= nand_davinci_probe,
>>   	.remove		= nand_davinci_remove,
>>   	.driver		= {
>> -		.name	= "davinci_nand",
>> +		.name	= "davinci-nand",
> 
> Another side-effect of this change you should be aware of: by doing
> that you also break all users that were defining partitions through the
> cmdline using mtdparts=davinci_nand.0:<part-layout>.
> 
> Not sure this is a good idea ;-).

Also, once we move to the common clock framework, the AUXDATA that causes
the DT clock lookup breakage you are trying to avoid will go away, so that
won't be a reason for changing this either.
Bartosz Golaszewski Feb. 19, 2018, 10:55 a.m. UTC | #4
2018-02-16 20:22 GMT+01:00 David Lechner <david@lechnology.com>:
> On 02/16/2018 01:19 PM, Boris Brezillon wrote:
>>
>> On Fri, 16 Feb 2018 17:47:07 +0100
>> Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>>
>>> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>>
>>> Commit d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock
>>> lookup table") broke the nand support in board file mode for
>>> da850-based boards. Instead of reverting it and breaking the DT users
>>> in the process (due to clock lookup), rename the driver to match the
>>> clock table before renaming the users.
>>>
>>> Fixes: d8e22fb4ccac ("ARM: da850: add the nand dev_id to the clock lookup
>>> table")
>>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>> ---
>>>   drivers/mtd/nand/davinci_nand.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mtd/nand/davinci_nand.c
>>> b/drivers/mtd/nand/davinci_nand.c
>>> index ccc8c43abcff..4fb143bf1872 100644
>>> --- a/drivers/mtd/nand/davinci_nand.c
>>> +++ b/drivers/mtd/nand/davinci_nand.c
>>> @@ -865,7 +865,7 @@ static struct platform_driver nand_davinci_driver = {
>>>         .probe          = nand_davinci_probe,
>>>         .remove         = nand_davinci_remove,
>>>         .driver         = {
>>> -               .name   = "davinci_nand",
>>> +               .name   = "davinci-nand",
>>
>>
>> Another side-effect of this change you should be aware of: by doing
>> that you also break all users that were defining partitions through the
>> cmdline using mtdparts=davinci_nand.0:<part-layout>.
>>
>> Not sure this is a good idea ;-).
>
>
> Also, once we move to the common clock framework, the AUXDATA that causes
> the DT clock lookup breakage you are trying to avoid will go away, so that
> won't be a reason for changing this either.
>
>

Ok, let's wait for v7 of your series then and reiterate this one.

Best regards,
Bartosz Golaszewski
diff mbox series

Patch

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index ccc8c43abcff..4fb143bf1872 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -865,7 +865,7 @@  static struct platform_driver nand_davinci_driver = {
 	.probe		= nand_davinci_probe,
 	.remove		= nand_davinci_remove,
 	.driver		= {
-		.name	= "davinci_nand",
+		.name	= "davinci-nand",
 		.of_match_table = of_match_ptr(davinci_nand_of_match),
 	},
 };