2015-07-10 06:37:39

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof


Krzysztof Kozlowski (2):
video: fbdev: Drop owner assignment from i2c_driver
video: fbdev: Drop owner assignment from platform_driver

drivers/video/fbdev/omap2/displays-new/encoder-opa362.c | 1 -
drivers/video/fbdev/ssd1307fb.c | 1 -
2 files changed, 2 deletions(-)

--
1.9.1


2015-07-10 06:38:00

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 1/2] video: fbdev: Drop owner assignment from i2c_driver

i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
drivers/video/fbdev/ssd1307fb.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 3e153c06131a..b6edd28b267f 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -719,7 +719,6 @@ static struct i2c_driver ssd1307fb_driver = {
.driver = {
.name = "ssd1307fb",
.of_match_table = ssd1307fb_of_match,
- .owner = THIS_MODULE,
},
};

--
1.9.1

2015-07-10 06:37:50

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 2/2] video: fbdev: Drop owner assignment from platform_driver

platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
drivers/video/fbdev/omap2/displays-new/encoder-opa362.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c b/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c
index a14d993f719d..8c246c213e06 100644
--- a/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c
+++ b/drivers/video/fbdev/omap2/displays-new/encoder-opa362.c
@@ -266,7 +266,6 @@ static struct platform_driver opa362_driver = {
.remove = __exit_p(opa362_remove),
.driver = {
.name = "amplifier-opa362",
- .owner = THIS_MODULE,
.of_match_table = opa362_of_match,
.suppress_bind_attrs = true,
},
--
1.9.1

2015-08-20 08:07:50

by Tomi Valkeinen

[permalink] [raw]
Subject: Re: [PATCH] Drop owner assignment from i2c_driver (and platform left-overs)



On 10/07/15 09:37, Krzysztof Kozlowski wrote:
> Hi,
>
>
> The i2c drivers also do not have to set 'owner' field because
> i2c_register_driver() will do it instead.
>
> 'owner' is removed from i2c drivers, which I was able to compile
> with allyesconfig (arm, arm64, i386, x86_64, ppc64).
> Only compile-tested.
>
> The coccinelle script which generated the patch was sent here:
> http://www.spinics.net/lists/kernel/msg2029903.html
>
>
> Best regards,
> Krzysztof
>
>
> Krzysztof Kozlowski (2):
> video: fbdev: Drop owner assignment from i2c_driver
> video: fbdev: Drop owner assignment from platform_driver
>
> drivers/video/fbdev/omap2/displays-new/encoder-opa362.c | 1 -
> drivers/video/fbdev/ssd1307fb.c | 1 -
> 2 files changed, 2 deletions(-)
>

Thanks, queued for 4.3.

Tomi


Attachments:
signature.asc (819.00 B)
OpenPGP digital signature