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):
tty: serial: Drop owner assignment from platform_driver
tty: serial: Drop owner assignment from i2c_driver
drivers/tty/serial/8250/8250_ingenic.c | 1 -
drivers/tty/serial/sc16is7xx.c | 1 -
2 files changed, 2 deletions(-)
--
1.9.1
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/tty/serial/8250/8250_ingenic.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/serial/8250/8250_ingenic.c
index 21bf81fe794f..7c1e4be48e7b 100644
--- a/drivers/tty/serial/8250/8250_ingenic.c
+++ b/drivers/tty/serial/8250/8250_ingenic.c
@@ -252,7 +252,6 @@ MODULE_DEVICE_TABLE(of, of_match);
static struct platform_driver ingenic_uart_platform_driver = {
.driver = {
.name = "ingenic-uart",
- .owner = THIS_MODULE,
.of_match_table = of_match,
},
.probe = ingenic_uart_probe,
--
1.9.1
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/tty/serial/sc16is7xx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 9e6576004a42..bbeb33561737 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1369,7 +1369,6 @@ MODULE_DEVICE_TABLE(i2c, sc16is7xx_i2c_id_table);
static struct i2c_driver sc16is7xx_i2c_uart_driver = {
.driver = {
.name = SC16IS7XX_NAME,
- .owner = THIS_MODULE,
.of_match_table = of_match_ptr(sc16is7xx_dt_ids),
},
.probe = sc16is7xx_i2c_probe,
--
1.9.1
<br><br>> From: [email protected]<br>> To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]<br>> Subject: [PATCH 2/2] tty: serial: Drop owner assignment from i2c_driver<br>> Date: Fri, 10 Jul 2015 15:36:20 +0900<br>> <br>> i2c_driver does not need to set an owner because i2c_register_driver()<br>> will set it.<br>> <br>> Signed-off-by: Krzysztof Kozlowski <[email protected]><br>> <br>> ---<br>> <br>> The coccinelle script which generated the patch was sent here:<br>> http://www.spinics.net/lists/kernel/msg2029903.html<br>> ---<br>> drivers/tty/serial/sc16is7xx.c | 1 -<br>> 1 file changed, 1 deletion(-)<br>> <br>> diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c<br>> index 9e6576004a42..bbeb33561737 100644<br>> --- a/drivers/tty/serial/sc16is7xx.c<br>> +++ b/drivers/tty/serial/sc16is7xx.c<br>> @@ -1369,7 +1369,6 @@ MODULE_DEVICE_TABLE(i2c, sc16is7xx_i2c_id_table);<br>> static struct i2c_driver sc16is7xx_i2c_uart_driver = {<br>> .driver = {<br>> .name = SC16IS7XX_NAME,<br>> - .owner = THIS_MODULE,<br><br>Okay, is there an issue by doing this. Or its just a over doing things ?<br><br>> .of_match_table = of_match_ptr(sc16is7xx_dt_ids),<br>> },<br>> .probe = sc16is7xx_i2c_probe,<br>> -- <br>> 1.9.1<br>> <br>> --<br>> To unsubscribe from this list: send the line "unsubscribe linux-serial" in<br>> the body of a message to [email protected]<br>> More majordomo info at http://vger.kernel.org/majordomo-info.html<br> -