RE: [PATCH 1/1] usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro

2013-03-05 Thread Li Yang-R58472
 Subject: [PATCH 1/1] usb: gadget: fsl_udc_core: Use
 module_platform_driver_probe macro
 
 module_platform_driver_probe() eliminates the boilerplate and simplifies
 the code.
 
 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 Cc: Li Yang le...@freescale.com

Acked-by: Li Yang le...@freescale.com

 ---
  drivers/usb/gadget/fsl_udc_core.c |   16 +---
  1 files changed, 1 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/usb/gadget/fsl_udc_core.c
 b/drivers/usb/gadget/fsl_udc_core.c
 index 04d5fef..f523897 100644
 --- a/drivers/usb/gadget/fsl_udc_core.c
 +++ b/drivers/usb/gadget/fsl_udc_core.c
 @@ -2747,21 +2747,7 @@ static struct platform_driver udc_driver = {
   },
  };
 
 -static int __init udc_init(void)
 -{
 - printk(KERN_INFO %s (%s)\n, driver_desc, DRIVER_VERSION);
 - return platform_driver_probe(udc_driver, fsl_udc_probe);
 -}
 -
 -module_init(udc_init);
 -
 -static void __exit udc_exit(void)
 -{
 - platform_driver_unregister(udc_driver);
 - printk(KERN_WARNING %s unregistered\n, driver_desc);
 -}
 -
 -module_exit(udc_exit);
 +module_platform_driver_probe(udc_driver, fsl_udc_probe);
 
  MODULE_DESCRIPTION(DRIVER_DESC);
  MODULE_AUTHOR(DRIVER_AUTHOR);
 --
 1.7.4.1
 


--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro

2013-03-05 Thread Felipe Balbi
On Tue, Mar 05, 2013 at 10:50:12AM +, Li Yang-R58472 wrote:
  Subject: [PATCH 1/1] usb: gadget: fsl_udc_core: Use
  module_platform_driver_probe macro
  
  module_platform_driver_probe() eliminates the boilerplate and simplifies
  the code.
  
  Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
  Cc: Li Yang le...@freescale.com
 
 Acked-by: Li Yang le...@freescale.com

I would rather see this moving to module_platform_driver() but perhaps
it can be done as a separate patch. I'll apply this one once -rc2 is
tagged.

Thank you

-- 
balbi


signature.asc
Description: Digital signature


[PATCH 1/1] usb: gadget: fsl_udc_core: Use module_platform_driver_probe macro

2013-03-04 Thread Sachin Kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
Cc: Li Yang le...@freescale.com
---
 drivers/usb/gadget/fsl_udc_core.c |   16 +---
 1 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc_core.c 
b/drivers/usb/gadget/fsl_udc_core.c
index 04d5fef..f523897 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2747,21 +2747,7 @@ static struct platform_driver udc_driver = {
},
 };
 
-static int __init udc_init(void)
-{
-   printk(KERN_INFO %s (%s)\n, driver_desc, DRIVER_VERSION);
-   return platform_driver_probe(udc_driver, fsl_udc_probe);
-}
-
-module_init(udc_init);
-
-static void __exit udc_exit(void)
-{
-   platform_driver_unregister(udc_driver);
-   printk(KERN_WARNING %s unregistered\n, driver_desc);
-}
-
-module_exit(udc_exit);
+module_platform_driver_probe(udc_driver, fsl_udc_probe);
 
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_AUTHOR(DRIVER_AUTHOR);
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html