[3/3] spi: qup: Remove .owner field for driver
diff mbox

Message ID 1412840528-31508-1-git-send-email-kiran.padwal@smartplayin.com
State New, archived
Headers show

Commit Message

kiran.padwal@smartplayin.com Oct. 9, 2014, 7:42 a.m. UTC
There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"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 <kiran.padwal@smartplayin.com>
---
 drivers/spi/spi-qup.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Mark Brown Oct. 13, 2014, 1:09 p.m. UTC | #1
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 <peter.griffin@linaro.org>
> "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?
kiran.padwal@smartplayin.com Oct. 14, 2014, 6:17 a.m. UTC | #2
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 <peter.griffin@linaro.org>
>> "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
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Oct. 14, 2014, 8:09 a.m. UTC | #3
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.
kiran.padwal@smartplayin.com Oct. 14, 2014, 9:01 a.m. UTC | #4
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
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

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,
 	},