public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb/misc/usb3503: Use module_i2c_driver to register driver
@ 2013-05-20 19:31 Peter Huewe
  2013-05-20 20:13 ` Peter Hüwe
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Huewe @ 2013-05-20 19:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Dongjin Kim, Peter Huewe, Fengguang Wu, linux-usb, linux-kernel

Removing some boilerplate by using module_i2c_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/usb/misc/usb3503.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
index f713f6a..72d1771 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -307,19 +307,7 @@ static struct i2c_driver usb3503_driver = {
 	.id_table	= usb3503_id,
 };
 
-static int __init usb3503_init(void)
-{
-	return i2c_add_driver(&usb3503_driver);
-}
-
-static void __exit usb3503_exit(void)
-{
-	i2c_del_driver(&usb3503_driver);
-}
-
-module_init(usb3503_init);
-module_exit(usb3503_exit);
-
+module_i2c_driver(usb3503_driver);
 MODULE_AUTHOR("Dongjin Kim <tobetter@gmail.com>");
 MODULE_DESCRIPTION("USB3503 USB HUB driver");
 MODULE_LICENSE("GPL");
-- 
1.8.1.5


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

* Re: [PATCH] usb/misc/usb3503: Use module_i2c_driver to register driver
  2013-05-20 19:31 [PATCH] usb/misc/usb3503: Use module_i2c_driver to register driver Peter Huewe
@ 2013-05-20 20:13 ` Peter Hüwe
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Hüwe @ 2013-05-20 20:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Dongjin Kim, Fengguang Wu, linux-usb, linux-kernel

Am Montag, 20. Mai 2013, 21:31:57 schrieb Peter Huewe:
> Removing some boilerplate by using module_i2c_driver instead of calling
> register and unregister in the otherwise empty init/exit functions
> 
> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
> ---
Sorry for the noise 
 already exists in 3.10-rc1 by Lars-Peter Clausen
8244ac0 USB: misc: usb3503: use module_i2c_driver to simplify the code


I was working on an stale tree - sorry.
Please ignore this patch.

Peter


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

end of thread, other threads:[~2013-05-20 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 19:31 [PATCH] usb/misc/usb3503: Use module_i2c_driver to register driver Peter Huewe
2013-05-20 20:13 ` Peter Hüwe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox