All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Drop owner assignment from i2c_driver (and platform left-overs)
@ 2015-07-10  5:32 Krzysztof Kozlowski
  2015-07-10  5:32 ` [PATCH] char: Drop owner assignment from i2c_driver Krzysztof Kozlowski
  2015-07-13 21:54 ` [PATCH] Drop owner assignment from i2c_driver (and platform left-overs) Peter Hüwe
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2015-07-10  5:32 UTC (permalink / raw)
  To: Corey Minyard, Peter Huewe, Marcel Selhorst, Jason Gunthorpe,
	Jarkko Sakkinen, Christophe Ricard, Krzysztof Kozlowski,
	openipmi-developer, linux-kernel, tpmdd-devel

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 (1):
  char: Drop owner assignment from i2c_driver

 drivers/char/ipmi/ipmi_ssif.c       | 1 -
 drivers/char/tpm/st33zp24/i2c.c     | 1 -
 drivers/char/tpm/tpm_i2c_atmel.c    | 1 -
 drivers/char/tpm/tpm_i2c_infineon.c | 1 -
 drivers/char/tpm/tpm_i2c_nuvoton.c  | 1 -
 5 files changed, 5 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] char: Drop owner assignment from i2c_driver
  2015-07-10  5:32 [PATCH] Drop owner assignment from i2c_driver (and platform left-overs) Krzysztof Kozlowski
@ 2015-07-10  5:32 ` Krzysztof Kozlowski
  2015-07-13 21:54 ` [PATCH] Drop owner assignment from i2c_driver (and platform left-overs) Peter Hüwe
  1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2015-07-10  5:32 UTC (permalink / raw)
  To: Corey Minyard, Peter Huewe, Marcel Selhorst, Jason Gunthorpe,
	Jarkko Sakkinen, Christophe Ricard, Krzysztof Kozlowski,
	openipmi-developer, linux-kernel, tpmdd-devel

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

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/char/ipmi/ipmi_ssif.c       | 1 -
 drivers/char/tpm/st33zp24/i2c.c     | 1 -
 drivers/char/tpm/tpm_i2c_atmel.c    | 1 -
 drivers/char/tpm/tpm_i2c_infineon.c | 1 -
 drivers/char/tpm/tpm_i2c_nuvoton.c  | 1 -
 5 files changed, 5 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index b043d8d45823..003a4ab3b660 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1950,7 +1950,6 @@ MODULE_DEVICE_TABLE(i2c, ssif_id);
 static struct i2c_driver ssif_i2c_driver = {
 	.class		= I2C_CLASS_HWMON,
 	.driver		= {
-		.owner			= THIS_MODULE,
 		.name			= DEVICE_NAME
 	},
 	.probe		= ssif_probe,
diff --git a/drivers/char/tpm/st33zp24/i2c.c b/drivers/char/tpm/st33zp24/i2c.c
index ad1ee180e0c2..309d2767c6a1 100644
--- a/drivers/char/tpm/st33zp24/i2c.c
+++ b/drivers/char/tpm/st33zp24/i2c.c
@@ -258,7 +258,6 @@ static SIMPLE_DEV_PM_OPS(st33zp24_i2c_ops, st33zp24_pm_suspend,
 
 static struct i2c_driver st33zp24_i2c_driver = {
 	.driver = {
-		.owner = THIS_MODULE,
 		.name = TPM_ST33_I2C,
 		.pm = &st33zp24_i2c_ops,
 		.of_match_table = of_match_ptr(of_st33zp24_i2c_match),
diff --git a/drivers/char/tpm/tpm_i2c_atmel.c b/drivers/char/tpm/tpm_i2c_atmel.c
index 7a0ca78ad3c6..8dfb88b9739c 100644
--- a/drivers/char/tpm/tpm_i2c_atmel.c
+++ b/drivers/char/tpm/tpm_i2c_atmel.c
@@ -217,7 +217,6 @@ static struct i2c_driver i2c_atmel_driver = {
 	.remove = i2c_atmel_remove,
 	.driver = {
 		.name = I2C_DRIVER_NAME,
-		.owner = THIS_MODULE,
 		.pm = &i2c_atmel_pm_ops,
 		.of_match_table = of_match_ptr(i2c_atmel_of_match),
 	},
diff --git a/drivers/char/tpm/tpm_i2c_infineon.c b/drivers/char/tpm/tpm_i2c_infineon.c
index 33c5f360ab01..63d5d22e9e60 100644
--- a/drivers/char/tpm/tpm_i2c_infineon.c
+++ b/drivers/char/tpm/tpm_i2c_infineon.c
@@ -711,7 +711,6 @@ static struct i2c_driver tpm_tis_i2c_driver = {
 	.remove = tpm_tis_i2c_remove,
 	.driver = {
 		   .name = "tpm_i2c_infineon",
-		   .owner = THIS_MODULE,
 		   .pm = &tpm_tis_i2c_ops,
 		   .of_match_table = of_match_ptr(tpm_tis_i2c_of_match),
 		   },
diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c
index 9d42b7d78e50..847f1597fe9b 100644
--- a/drivers/char/tpm/tpm_i2c_nuvoton.c
+++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
@@ -641,7 +641,6 @@ static struct i2c_driver i2c_nuvoton_driver = {
 	.remove = i2c_nuvoton_remove,
 	.driver = {
 		.name = I2C_DRIVER_NAME,
-		.owner = THIS_MODULE,
 		.pm = &i2c_nuvoton_pm_ops,
 		.of_match_table = of_match_ptr(i2c_nuvoton_of_match),
 	},
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Drop owner assignment from i2c_driver (and platform left-overs)
  2015-07-10  5:32 [PATCH] Drop owner assignment from i2c_driver (and platform left-overs) Krzysztof Kozlowski
  2015-07-10  5:32 ` [PATCH] char: Drop owner assignment from i2c_driver Krzysztof Kozlowski
@ 2015-07-13 21:54 ` Peter Hüwe
  2015-07-13 22:15   ` Jason Gunthorpe
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Hüwe @ 2015-07-13 21:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-kernel
  Cc: Corey Minyard, Marcel Selhorst, Jason Gunthorpe, Jarkko Sakkinen,
	Christophe Ricard, tpmdd-devel

Am Freitag, 10. Juli 2015, 07:32:28 schrieb Krzysztof Kozlowski:
> 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 (1):
>   char: Drop owner assignment from i2c_driver
> 
>  drivers/char/ipmi/ipmi_ssif.c       | 1 -
>  drivers/char/tpm/st33zp24/i2c.c     | 1 -
>  drivers/char/tpm/tpm_i2c_atmel.c    | 1 -
>  drivers/char/tpm/tpm_i2c_infineon.c | 1 -
>  drivers/char/tpm/tpm_i2c_nuvoton.c  | 1 -
>  5 files changed, 5 deletions(-)


Applied - thanks.
Will be included in the pull-request for 4.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Drop owner assignment from i2c_driver (and platform left-overs)
  2015-07-13 21:54 ` [PATCH] Drop owner assignment from i2c_driver (and platform left-overs) Peter Hüwe
@ 2015-07-13 22:15   ` Jason Gunthorpe
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2015-07-13 22:15 UTC (permalink / raw)
  To: Peter Hüwe
  Cc: Krzysztof Kozlowski, linux-kernel, Corey Minyard,
	Marcel Selhorst, Jarkko Sakkinen, Christophe Ricard, tpmdd-devel

On Mon, Jul 13, 2015 at 11:54:50PM +0200, Peter Hüwe wrote:
> Am Freitag, 10. Juli 2015, 07:32:28 schrieb Krzysztof Kozlowski:
> > Hi,
> > 
> > 
> > The i2c drivers also do not have to set 'owner' field because
> > i2c_register_driver() will do it instead.
> 
> Applied - thanks.
> Will be included in the pull-request for 4.3

FWIW, this looked OK to me as well

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-13 22:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10  5:32 [PATCH] Drop owner assignment from i2c_driver (and platform left-overs) Krzysztof Kozlowski
2015-07-10  5:32 ` [PATCH] char: Drop owner assignment from i2c_driver Krzysztof Kozlowski
2015-07-13 21:54 ` [PATCH] Drop owner assignment from i2c_driver (and platform left-overs) Peter Hüwe
2015-07-13 22:15   ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.