2014-10-09 07:44:29

by Kiran Padwal

[permalink] [raw]
Subject: [PATCH 3/3] spi: qup: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <[email protected]>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superfluous .owner field for drivers which
use the module_platform_driver API, as this is overridden in
platform_driver_register anyway."

Signed-off-by: Kiran Padwal <[email protected]>
---
drivers/spi/spi-qup.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index 97471e1..30511bd 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -758,7 +758,6 @@ static const struct dev_pm_ops spi_qup_dev_pm_ops = {
static struct platform_driver spi_qup_driver = {
.driver = {
.name = "spi_qup",
- .owner = THIS_MODULE,
.pm = &spi_qup_dev_pm_ops,
.of_match_table = spi_qup_dt_match,
},
--
1.7.9.5


2014-10-13 13:10:28

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 3/3] spi: qup: Remove .owner field for driver

On Thu, Oct 09, 2014 at 01:12:08PM +0530, Kiran Padwal wrote:
> There is no need to init .owner field.
>
> Based on the patch from Peter Griffin <[email protected]>
> "mmc: remove .owner field for drivers using module_platform_driver"
>
> This patch removes the superfluous .owner field for drivers which
> use the module_platform_driver API, as this is overridden in
> platform_driver_register anyway."

Two problems:
- I'm missing patches 1 and 2.
- This only changes one driver but essentially every SPI driver
initializes .owner - why is only thi sone driver being changed?


Attachments:
(No filename) (592.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2014-10-14 06:19:56

by Kiran Padwal

[permalink] [raw]
Subject: Re: [PATCH 3/3] spi: qup: Remove .owner field for driver

On Monday 13 October 2014 06:39 PM, Mark Brown wrote:
> On Thu, Oct 09, 2014 at 01:12:08PM +0530, Kiran Padwal wrote:
>> There is no need to init .owner field.
>>
>> Based on the patch from Peter Griffin <[email protected]>
>> "mmc: remove .owner field for drivers using module_platform_driver"
>>
>> This patch removes the superfluous .owner field for drivers which
>> use the module_platform_driver API, as this is overridden in
>> platform_driver_register anyway."
>
> Two problems:
> - I'm missing patches 1 and 2.

These patches are same like this one,
[1] https://lkml.org/lkml/2014/10/9/58
[2] https://lkml.org/lkml/2014/10/9/52

> - This only changes one driver but essentially every SPI driver
> initializes .owner - why is only thi sone driver being changed?
>

Nothing more intention, but just remove superfluous .owner field for drivers which
use the module_platform_driver API, as this is overridden in
platform_driver_register anyway.

Thanks,
--Kiran

2014-10-14 08:10:39

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 3/3] spi: qup: Remove .owner field for driver

On Tue, Oct 14, 2014 at 11:47:57AM +0530, Kiran Padwal wrote:
> On Monday 13 October 2014 06:39 PM, Mark Brown wrote:

> > Two problems:
> > - I'm missing patches 1 and 2.

> These patches are same like this one,
> [1] https://lkml.org/lkml/2014/10/9/58
> [2] https://lkml.org/lkml/2014/10/9/52

You should at least be sending the cover letter to everyone so that they
know what's going on.

> > - This only changes one driver but essentially every SPI driver
> > initializes .owner - why is only thi sone driver being changed?

> Nothing more intention, but just remove superfluous .owner field for drivers which
> use the module_platform_driver API, as this is overridden in
> platform_driver_register anyway.

My point is that doing a change like this to random drivers isn't great,
if you're going to do this sort of thing it is better to do it for
everything rather than making things inconsistent.


Attachments:
(No filename) (909.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2014-10-14 09:03:22

by Kiran Padwal

[permalink] [raw]
Subject: Re: [PATCH 3/3] spi: qup: Remove .owner field for driver

On Tuesday 14 October 2014 01:39 PM, Mark Brown wrote:
> On Tue, Oct 14, 2014 at 11:47:57AM +0530, Kiran Padwal wrote:
>> On Monday 13 October 2014 06:39 PM, Mark Brown wrote:
>
>>> Two problems:
>>> - I'm missing patches 1 and 2.
>
>> These patches are same like this one,
>> [1] https://lkml.org/lkml/2014/10/9/58
>> [2] https://lkml.org/lkml/2014/10/9/52
>
> You should at least be sending the cover letter to everyone so that they
> know what's going on.

OK, I will take care of this next time.

>
>>> - This only changes one driver but essentially every SPI driver
>>> initializes .owner - why is only thi sone driver being changed?
>
>> Nothing more intention, but just remove superfluous .owner field for drivers which
>> use the module_platform_driver API, as this is overridden in
>> platform_driver_register anyway.
>
> My point is that doing a change like this to random drivers isn't great,
> if you're going to do this sort of thing it is better to do it for
> everything rather than making things inconsistent.
>

Sure, I will do that.

Thanks,
--Kiran