[media] convert drivers/media/* to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Tue, 10 Jan 2012 06:21:49 +0000 (03:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 11 Jan 2012 01:27:13 +0000 (23:27 -0200)
This patch converts the drivers in drivers/media/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com>
Cc: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Muralidharan Karicheri <m-karicheri2@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Daniel Drake <dsd@laptop.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
25 files changed:
drivers/media/radio/radio-si4713.c
drivers/media/radio/radio-timb.c
drivers/media/radio/radio-wl1273.c
drivers/media/video/davinci/dm355_ccdc.c
drivers/media/video/davinci/dm644x_ccdc.c
drivers/media/video/davinci/isif.c
drivers/media/video/davinci/vpbe.c
drivers/media/video/davinci/vpbe_display.c
drivers/media/video/davinci/vpbe_osd.c
drivers/media/video/davinci/vpbe_venc.c
drivers/media/video/davinci/vpfe_capture.c
drivers/media/video/fsl-viu.c
drivers/media/video/mx3_camera.c
drivers/media/video/omap1_camera.c
drivers/media/video/omap24xxcam.c
drivers/media/video/omap3isp/isp.c
drivers/media/video/pxa_camera.c
drivers/media/video/s5p-g2d/g2d.c
drivers/media/video/s5p-mfc/s5p_mfc.c
drivers/media/video/s5p-tv/hdmi_drv.c
drivers/media/video/s5p-tv/sdo_drv.c
drivers/media/video/sh_mobile_csi2.c
drivers/media/video/soc_camera_platform.c
drivers/media/video/timblogiw.c
drivers/media/video/via-camera.c

index d1fab58850612a333fea3a5f26603bf04c52bc90..c54210c7fef90783200ccec467230fa6a7f3dc69 100644 (file)
@@ -355,17 +355,4 @@ static struct platform_driver radio_si4713_pdriver = {
        .remove         = __exit_p(radio_si4713_pdriver_remove),
 };
 
-/* Module Interface */
-static int __init radio_si4713_module_init(void)
-{
-       return platform_driver_register(&radio_si4713_pdriver);
-}
-
-static void __exit radio_si4713_module_exit(void)
-{
-       platform_driver_unregister(&radio_si4713_pdriver);
-}
-
-module_init(radio_si4713_module_init);
-module_exit(radio_si4713_module_exit);
-
+module_platform_driver(radio_si4713_pdriver);
index 3e9209f84e09bb04f46e75e2e517f10f9d37f608..5d9a90ac3a1c0230b75bffaeff6de7f4cfbb015c 100644 (file)
@@ -226,20 +226,7 @@ static struct platform_driver timbradio_platform_driver = {
        .remove         = timbradio_remove,
 };
 
-/*--------------------------------------------------------------------------*/
-
-static int __init timbradio_init(void)
-{
-       return platform_driver_register(&timbradio_platform_driver);
-}
-
-static void __exit timbradio_exit(void)
-{
-       platform_driver_unregister(&timbradio_platform_driver);
-}
-
-module_init(timbradio_init);
-module_exit(timbradio_exit);
+module_platform_driver(timbradio_platform_driver);
 
 MODULE_DESCRIPTION("Timberdale Radio driver");
 MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>");
index 8aa4968d57bc6cf3317669fb3a8b9c27daf074b4..f1b607099b6c10361a1305c521b612d7c10ca8ff 100644 (file)
@@ -2148,8 +2148,6 @@ pdata_err:
        return r;
 }
 
-MODULE_ALIAS("platform:wl1273_fm_radio");
-
 static struct platform_driver wl1273_fm_radio_driver = {
        .probe          = wl1273_fm_radio_probe,
        .remove         = __devexit_p(wl1273_fm_radio_remove),
@@ -2159,20 +2157,9 @@ static struct platform_driver wl1273_fm_radio_driver = {
        },
 };
 
-static int __init wl1273_fm_module_init(void)
-{
-       pr_info("%s\n", __func__);
-       return platform_driver_register(&wl1273_fm_radio_driver);
-}
-module_init(wl1273_fm_module_init);
-
-static void __exit wl1273_fm_module_exit(void)
-{
-       platform_driver_unregister(&wl1273_fm_radio_driver);
-       pr_info(DRIVER_DESC ", Exiting.\n");
-}
-module_exit(wl1273_fm_module_exit);
+module_platform_driver(wl1273_fm_radio_driver);
 
 MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>");
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:wl1273_fm_radio");
index bd443ee76fff2a342b5c7633969affdbadfa480e..f83baf3a52b0b7ae40f0e05091b2cb90147e2d4a 100644 (file)
@@ -1069,15 +1069,4 @@ static struct platform_driver dm355_ccdc_driver = {
        .probe = dm355_ccdc_probe,
 };
 
-static int __init dm355_ccdc_init(void)
-{
-       return platform_driver_register(&dm355_ccdc_driver);
-}
-
-static void __exit dm355_ccdc_exit(void)
-{
-       platform_driver_unregister(&dm355_ccdc_driver);
-}
-
-module_init(dm355_ccdc_init);
-module_exit(dm355_ccdc_exit);
+module_platform_driver(dm355_ccdc_driver);
index 8051c2956478d9ff826839874b34338ca675dcc8..9303fe553b075899e09e529173373de77af5a871 100644 (file)
@@ -1078,15 +1078,4 @@ static struct platform_driver dm644x_ccdc_driver = {
        .probe = dm644x_ccdc_probe,
 };
 
-static int __init dm644x_ccdc_init(void)
-{
-       return platform_driver_register(&dm644x_ccdc_driver);
-}
-
-static void __exit dm644x_ccdc_exit(void)
-{
-       platform_driver_unregister(&dm644x_ccdc_driver);
-}
-
-module_init(dm644x_ccdc_init);
-module_exit(dm644x_ccdc_exit);
+module_platform_driver(dm644x_ccdc_driver);
index 29c29c668596276c8c4ebeb366cd482439209d3c..1e63852374bed0641e443c9c0237dc7868c90598 100644 (file)
@@ -1156,17 +1156,6 @@ static struct platform_driver isif_driver = {
        .probe = isif_probe,
 };
 
-static int __init isif_init(void)
-{
-       return platform_driver_register(&isif_driver);
-}
-
-static void isif_exit(void)
-{
-       platform_driver_unregister(&isif_driver);
-}
-
-module_init(isif_init);
-module_exit(isif_exit);
+module_platform_driver(isif_driver);
 
 MODULE_LICENSE("GPL");
index 1cc254d52a4179ab361b7038d3ecc1960ccbedb8..c4a82a1a8a977f42431e47e5fba269173c48c272 100644 (file)
@@ -883,26 +883,4 @@ static struct platform_driver vpbe_driver = {
        .remove = vpbe_remove,
 };
 
-/**
- * vpbe_init: initialize the vpbe driver
- *
- * This function registers device and driver to the kernel
- */
-static __init int vpbe_init(void)
-{
-       return platform_driver_register(&vpbe_driver);
-}
-
-/**
- * vpbe_cleanup : cleanup function for vpbe driver
- *
- * This will un-registers the device and driver to the kernel
- */
-static void vpbe_cleanup(void)
-{
-       platform_driver_unregister(&vpbe_driver);
-}
-
-/* Function for module initialization and cleanup */
-module_init(vpbe_init);
-module_exit(vpbe_cleanup);
+module_platform_driver(vpbe_driver);
index d98da4bfb256b2948c546cc32935e59776b9470b..1f3b1c72925297efd8cb549dc206b18b77eab497 100644 (file)
@@ -1817,43 +1817,7 @@ static struct platform_driver vpbe_display_driver = {
        .remove = __devexit_p(vpbe_display_remove),
 };
 
-/*
- * vpbe_display_init()
- * This function registers device and driver to the kernel, requests irq
- * handler and allocates memory for layer objects
- */
-static __devinit int vpbe_display_init(void)
-{
-       int err;
-
-       printk(KERN_DEBUG "vpbe_display_init\n");
-
-       /* Register driver to the kernel */
-       err = platform_driver_register(&vpbe_display_driver);
-       if (0 != err)
-               return err;
-
-       printk(KERN_DEBUG "vpbe_display_init:"
-                       "VPBE V4L2 Display Driver V1.0 loaded\n");
-       return 0;
-}
-
-/*
- * vpbe_display_cleanup()
- * This function un-registers device and driver to the kernel, frees requested
- * irq handler and de-allocates memory allocated for layer objects.
- */
-static void vpbe_display_cleanup(void)
-{
-       printk(KERN_DEBUG "vpbe_display_cleanup\n");
-
-       /* platform driver unregister */
-       platform_driver_unregister(&vpbe_display_driver);
-}
-
-/* Function for module initialization and cleanup */
-module_init(vpbe_display_init);
-module_exit(vpbe_display_cleanup);
+module_platform_driver(vpbe_display_driver);
 
 MODULE_DESCRIPTION("TI DM644x/DM355/DM365 VPBE Display controller");
 MODULE_LICENSE("GPL");
index feeec2256c48dc97dac84d0312a83ff95a020f87..d6488b79ae3b54602e09170372b03bbbe8f3929a 100644 (file)
@@ -1599,23 +1599,7 @@ static struct platform_driver osd_driver = {
        },
 };
 
-static int osd_init(void)
-{
-       if (platform_driver_register(&osd_driver)) {
-               printk(KERN_ERR "Unable to register davinci osd driver\n");
-               return -ENODEV;
-       }
-
-       return 0;
-}
-
-static void osd_exit(void)
-{
-       platform_driver_unregister(&osd_driver);
-}
-
-module_init(osd_init);
-module_exit(osd_exit);
+module_platform_driver(osd_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("DaVinci OSD Manager Driver");
index 53c29943e91fa01621868df6ecdd94bbb61be402..00e80f59d5d5339c6f0e835e9f82103d328be7f5 100644 (file)
@@ -700,23 +700,7 @@ static struct platform_driver venc_driver = {
        },
 };
 
-static int venc_init(void)
-{
-       if (platform_driver_register(&venc_driver)) {
-               printk(KERN_ERR "Unable to register venc driver\n");
-               return -ENODEV;
-       }
-       return 0;
-}
-
-static void venc_exit(void)
-{
-       platform_driver_unregister(&venc_driver);
-       return;
-}
-
-module_init(venc_init);
-module_exit(venc_exit);
+module_platform_driver(venc_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("VPBE VENC Driver");
index 5b38fc93ff280c7fe8fa3e22f386ccaa31c9d824..20cf271a774b81b6c3d9b32b963287f30130f3f7 100644 (file)
@@ -2076,20 +2076,4 @@ static struct platform_driver vpfe_driver = {
        .remove = __devexit_p(vpfe_remove),
 };
 
-static __init int vpfe_init(void)
-{
-       printk(KERN_NOTICE "vpfe_init\n");
-       /* Register driver to the kernel */
-       return platform_driver_register(&vpfe_driver);
-}
-
-/*
- * vpfe_cleanup : This function un-registers device driver
- */
-static void vpfe_cleanup(void)
-{
-       platform_driver_unregister(&vpfe_driver);
-}
-
-module_init(vpfe_init);
-module_exit(vpfe_cleanup);
+module_platform_driver(vpfe_driver);
index 27cb197d0bd6e911696750e988a85e5af0a5994f..27e3e0c0b219138a689909203d9ebf3fa354ea12 100644 (file)
@@ -1661,18 +1661,7 @@ static struct platform_driver viu_of_platform_driver = {
        },
 };
 
-static int __init viu_init(void)
-{
-       return platform_driver_register(&viu_of_platform_driver);
-}
-
-static void __exit viu_exit(void)
-{
-       platform_driver_unregister(&viu_of_platform_driver);
-}
-
-module_init(viu_init);
-module_exit(viu_exit);
+module_platform_driver(viu_of_platform_driver);
 
 MODULE_DESCRIPTION("Freescale Video-In(VIU)");
 MODULE_AUTHOR("Hongjun Chen");
index ba004747ff018996775cb96b82a0af550a80a9d7..0cb461dd396af39ffbff65b387fdae11742d4ebf 100644 (file)
@@ -1286,19 +1286,7 @@ static struct platform_driver mx3_camera_driver = {
        .remove         = __devexit_p(mx3_camera_remove),
 };
 
-
-static int __init mx3_camera_init(void)
-{
-       return platform_driver_register(&mx3_camera_driver);
-}
-
-static void __exit mx3_camera_exit(void)
-{
-       platform_driver_unregister(&mx3_camera_driver);
-}
-
-module_init(mx3_camera_init);
-module_exit(mx3_camera_exit);
+module_platform_driver(mx3_camera_driver);
 
 MODULE_DESCRIPTION("i.MX3x SoC Camera Host driver");
 MODULE_AUTHOR("Guennadi Liakhovetski <lg@denx.de>");
index 946ee55c018a307de95dbc0667a80b67d8869250..c20f5ecd67904d634d818b734b49a8f68f5dc2a3 100644 (file)
@@ -1713,17 +1713,7 @@ static struct platform_driver omap1_cam_driver = {
        .remove         = __exit_p(omap1_cam_remove),
 };
 
-static int __init omap1_cam_init(void)
-{
-       return platform_driver_register(&omap1_cam_driver);
-}
-module_init(omap1_cam_init);
-
-static void __exit omap1_cam_exit(void)
-{
-       platform_driver_unregister(&omap1_cam_driver);
-}
-module_exit(omap1_cam_exit);
+module_platform_driver(omap1_cam_driver);
 
 module_param(sg_mode, bool, 0644);
 MODULE_PARM_DESC(sg_mode, "videobuf mode, 0: dma-contig (default), 1: dma-sg");
index 45522e603185f45dbc5bac41c3c99032f06da6ca..7d3864144368c30e7a1916ae169c4999765fba62 100644 (file)
@@ -1868,21 +1868,7 @@ static struct platform_driver omap24xxcam_driver = {
        },
 };
 
-/*
- *
- * Module initialisation and deinitialisation
- *
- */
-
-static int __init omap24xxcam_init(void)
-{
-       return platform_driver_register(&omap24xxcam_driver);
-}
-
-static void __exit omap24xxcam_cleanup(void)
-{
-       platform_driver_unregister(&omap24xxcam_driver);
-}
+module_platform_driver(omap24xxcam_driver);
 
 MODULE_AUTHOR("Sakari Ailus <sakari.ailus@nokia.com>");
 MODULE_DESCRIPTION("OMAP24xx Video for Linux camera driver");
@@ -1894,6 +1880,3 @@ MODULE_PARM_DESC(video_nr,
 module_param(capture_mem, int, 0);
 MODULE_PARM_DESC(capture_mem, "Maximum amount of memory for capture "
                 "buffers (default 4800kiB)");
-
-module_init(omap24xxcam_init);
-module_exit(omap24xxcam_cleanup);
index 5cc15ba6a76ac9a57b7b103a573976d5fc25d392..faf1650e8747051fbd3b83dc141ef7c316f9c49a 100644 (file)
@@ -2247,24 +2247,7 @@ static struct platform_driver omap3isp_driver = {
        },
 };
 
-/*
- * isp_init - ISP module initialization.
- */
-static int __init isp_init(void)
-{
-       return platform_driver_register(&omap3isp_driver);
-}
-
-/*
- * isp_cleanup - ISP module cleanup.
- */
-static void __exit isp_cleanup(void)
-{
-       platform_driver_unregister(&omap3isp_driver);
-}
-
-module_init(isp_init);
-module_exit(isp_cleanup);
+module_platform_driver(omap3isp_driver);
 
 MODULE_AUTHOR("Nokia Corporation");
 MODULE_DESCRIPTION("TI OMAP3 ISP driver");
index 2f9ae634b7cf77002300c15074cf73b090e170a2..0bd7da26d018142878c35956ae8c1126a44c5bfb 100644 (file)
@@ -1852,19 +1852,7 @@ static struct platform_driver pxa_camera_driver = {
        .remove         = __devexit_p(pxa_camera_remove),
 };
 
-
-static int __init pxa_camera_init(void)
-{
-       return platform_driver_register(&pxa_camera_driver);
-}
-
-static void __exit pxa_camera_exit(void)
-{
-       platform_driver_unregister(&pxa_camera_driver);
-}
-
-module_init(pxa_camera_init);
-module_exit(pxa_camera_exit);
+module_platform_driver(pxa_camera_driver);
 
 MODULE_DESCRIPTION("PXA27x SoC Camera Host driver");
 MODULE_AUTHOR("Guennadi Liakhovetski <kernel@pengutronix.de>");
index 1f156c8fe63e9fdd14db7e95331b32f018fcb2f1..c40b0dde188353eb9dba6b9f88e894c7f586d4c3 100644 (file)
@@ -803,21 +803,7 @@ static struct platform_driver g2d_pdrv = {
        },
 };
 
-static void __exit g2d_exit(void)
-{
-       platform_driver_unregister(&g2d_pdrv);
-};
-
-static int  __init g2d_init(void)
-{
-       int ret = 0;
-
-       ret = platform_driver_register(&g2d_pdrv);
-       return ret;
-};
-
-module_init(g2d_init);
-module_exit(g2d_exit);
+module_platform_driver(g2d_pdrv);
 
 MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>");
 MODULE_DESCRIPTION("S5P G2D 2d graphics accelerator driver");
index 8be8b54eb749769449a49f68fcf23f57b3628bd9..e43e128baf5f7c3ec7051337a1574821e9e863a2 100644 (file)
@@ -1245,27 +1245,7 @@ static struct platform_driver s5p_mfc_driver = {
        },
 };
 
-static char banner[] __initdata =
-                       "S5P MFC V4L2 Driver, (C) 2011 Samsung Electronics\n";
-
-static int __init s5p_mfc_init(void)
-{
-       int ret;
-
-       pr_info("%s", banner);
-       ret = platform_driver_register(&s5p_mfc_driver);
-       if (ret)
-               pr_err("Platform device registration failed.\n");
-       return ret;
-}
-
-static void __exit s5p_mfc_exit(void)
-{
-       platform_driver_unregister(&s5p_mfc_driver);
-}
-
-module_init(s5p_mfc_init);
-module_exit(s5p_mfc_exit);
+module_platform_driver(s5p_mfc_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Kamil Debski <k.debski@samsung.com>");
index 8199288481f3b613de82f1322c1f3624e5043c69..8b41a0410ab175ab3968ad66036c6290301a6a68 100644 (file)
@@ -1016,28 +1016,4 @@ static struct platform_driver hdmi_driver __refdata = {
        }
 };
 
-/* D R I V E R   I N I T I A L I Z A T I O N */
-
-static int __init hdmi_init(void)
-{
-       int ret;
-       static const char banner[] __initdata = KERN_INFO \
-               "Samsung HDMI output driver, "
-               "(c) 2010-2011 Samsung Electronics Co., Ltd.\n";
-       printk(banner);
-
-       ret = platform_driver_register(&hdmi_driver);
-       if (ret)
-               printk(KERN_ERR "HDMI platform driver register failed\n");
-
-       return ret;
-}
-module_init(hdmi_init);
-
-static void __exit hdmi_exit(void)
-{
-       platform_driver_unregister(&hdmi_driver);
-}
-module_exit(hdmi_exit);
-
-
+module_platform_driver(hdmi_driver);
index 8cec67ef48c9214b0f529039e905de235bca219c..059e7749ce95322962a58c0b411fe33007293a58 100644 (file)
@@ -457,24 +457,4 @@ static struct platform_driver sdo_driver __refdata = {
        }
 };
 
-static int __init sdo_init(void)
-{
-       int ret;
-       static const char banner[] __initdata = KERN_INFO \
-               "Samsung Standard Definition Output (SDO) driver, "
-               "(c) 2010-2011 Samsung Electronics Co., Ltd.\n";
-       printk(banner);
-
-       ret = platform_driver_register(&sdo_driver);
-       if (ret)
-               printk(KERN_ERR "SDO platform driver register failed\n");
-
-       return ret;
-}
-module_init(sdo_init);
-
-static void __exit sdo_exit(void)
-{
-       platform_driver_unregister(&sdo_driver);
-}
-module_exit(sdo_exit);
+module_platform_driver(sdo_driver);
index 8a652b53ff7e9a8a1a4ad0f00bf7a874bf8f3bf6..05286500b4d432de590fa206070c2611bcb57a5a 100644 (file)
@@ -390,18 +390,7 @@ static struct platform_driver __refdata sh_csi2_pdrv = {
        },
 };
 
-static int __init sh_csi2_init(void)
-{
-       return platform_driver_register(&sh_csi2_pdrv);
-}
-
-static void __exit sh_csi2_exit(void)
-{
-       platform_driver_unregister(&sh_csi2_pdrv);
-}
-
-module_init(sh_csi2_init);
-module_exit(sh_csi2_exit);
+module_platform_driver(sh_csi2_pdrv);
 
 MODULE_DESCRIPTION("SH-Mobile MIPI CSI-2 driver");
 MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
index 4402a8a74f7a727fc7dd87492a98b5c8ad426d7a..f59ccade07c8b5cb9a0c3ebb4c4bdb539e2cbea8 100644 (file)
@@ -189,18 +189,7 @@ static struct platform_driver soc_camera_platform_driver = {
        .remove         = soc_camera_platform_remove,
 };
 
-static int __init soc_camera_platform_module_init(void)
-{
-       return platform_driver_register(&soc_camera_platform_driver);
-}
-
-static void __exit soc_camera_platform_module_exit(void)
-{
-       platform_driver_unregister(&soc_camera_platform_driver);
-}
-
-module_init(soc_camera_platform_module_init);
-module_exit(soc_camera_platform_module_exit);
+module_platform_driver(soc_camera_platform_driver);
 
 MODULE_DESCRIPTION("SoC Camera Platform driver");
 MODULE_AUTHOR("Magnus Damm");
index a0895bf07487847c921505e7d119dfa434c40037..0a2d75f0406631f582b17b50aaf6c4cd11e074df 100644 (file)
@@ -872,20 +872,7 @@ static struct platform_driver timblogiw_platform_driver = {
        .remove         = __devexit_p(timblogiw_remove),
 };
 
-/* Module functions */
-
-static int __init timblogiw_init(void)
-{
-       return platform_driver_register(&timblogiw_platform_driver);
-}
-
-static void __exit timblogiw_exit(void)
-{
-       platform_driver_unregister(&timblogiw_platform_driver);
-}
-
-module_init(timblogiw_init);
-module_exit(timblogiw_exit);
+module_platform_driver(timblogiw_platform_driver);
 
 MODULE_DESCRIPTION(TIMBLOGIWIN_NAME);
 MODULE_AUTHOR("Pelagicore AB <info@pelagicore.com>");
index 6a828759e38773028642c98cc4f9e1d893fcb448..7e2c34ed0564217f804472e93b9eeb86217f9d27 100644 (file)
@@ -1500,14 +1500,4 @@ static struct platform_driver viacam_driver = {
        .remove = viacam_remove,
 };
 
-static int viacam_init(void)
-{
-       return platform_driver_register(&viacam_driver);
-}
-module_init(viacam_init);
-
-static void viacam_exit(void)
-{
-       platform_driver_unregister(&viacam_driver);
-}
-module_exit(viacam_exit);
+module_platform_driver(viacam_driver);