diff mbox

[1/2] spi: xilinx: Remove .owner field for driver

Message ID d35c656e50eb7cc951499f13ef339d6aa1a23deb.1407930755.git.michal.simek@xilinx.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Simek Aug. 13, 2014, 11:52 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 superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/spi/spi-xilinx.c | 1 -
 1 file changed, 1 deletion(-)

--
1.8.2.3

Comments

Mark Brown Aug. 13, 2014, 12:33 p.m. UTC | #1
On Wed, Aug 13, 2014 at 01:52:39PM +0200, Michal Simek 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 superflous .owner field for drivers which
> use the module_platform_driver API, as this is overriden in
> platform_driver_register anyway."

Would it not be better to do this as a tree wide or at least subsystem
wide sweep with something like cocinelle?
Michal Simek Aug. 13, 2014, 1:21 p.m. UTC | #2
On 08/13/2014 02:33 PM, Mark Brown wrote:
> On Wed, Aug 13, 2014 at 01:52:39PM +0200, Michal Simek 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 superflous .owner field for drivers which
>> use the module_platform_driver API, as this is overriden in
>> platform_driver_register anyway."
> 
> Would it not be better to do this as a tree wide or at least subsystem
> wide sweep with something like cocinelle?

Feel free to use cocinelle for fixing this everywhere.
For me was just easier to fix all xilinx drivers to ensure
that none else will copy it for new drivers.

Thanks,
Michal
Mark Brown Aug. 16, 2014, 3:21 p.m. UTC | #3
On Wed, Aug 13, 2014 at 03:21:29PM +0200, Michal Simek wrote:
> On 08/13/2014 02:33 PM, Mark Brown wrote:

> > Would it not be better to do this as a tree wide or at least subsystem
> > wide sweep with something like cocinelle?

> Feel free to use cocinelle for fixing this everywhere.
> For me was just easier to fix all xilinx drivers to ensure
> that none else will copy it for new drivers.

I'd expect people would be more likely to copy a random driver for the
subsystem they're working with than specifically a Xilinx driver...
diff mbox

Patch

diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 4d8efb16573d..79bd84f43430 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -471,7 +471,6 @@  static struct platform_driver xilinx_spi_driver = {
 	.remove = xilinx_spi_remove,
 	.driver = {
 		.name = XILINX_SPI_NAME,
-		.owner = THIS_MODULE,
 		.of_match_table = xilinx_spi_of_match,
 	},
 };