Message ID | 1354287981-24545-1-git-send-email-fabio.estevam@freescale.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Guennadi, On Fri, Nov 30, 2012 at 1:06 PM, Fabio Estevam <fabio.estevam@freescale.com> wrote: > Converting it to platform code can make the code smaller. > > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Does this patch look good? Regards, Fabio Estevam -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c index 791cd1d..36b4ee0 100644 --- a/drivers/media/platform/soc_camera/mx2_camera.c +++ b/drivers/media/platform/soc_camera/mx2_camera.c @@ -1912,22 +1912,11 @@ static struct platform_driver mx2_camera_driver = { .name = MX2_CAM_DRV_NAME, }, .id_table = mx2_camera_devtype, + .probe = mx2_camera_probe, .remove = __devexit_p(mx2_camera_remove), }; - -static int __init mx2_camera_init(void) -{ - return platform_driver_probe(&mx2_camera_driver, &mx2_camera_probe); -} - -static void __exit mx2_camera_exit(void) -{ - return platform_driver_unregister(&mx2_camera_driver); -} - -module_init(mx2_camera_init); -module_exit(mx2_camera_exit); +module_platform_driver(mx2_camera_driver); MODULE_DESCRIPTION("i.MX27/i.MX25 SoC Camera Host driver"); MODULE_AUTHOR("Sascha Hauer <sha@pengutronix.de>");
Converting it to platform code can make the code smaller. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> --- drivers/media/platform/soc_camera/mx2_camera.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)