aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-02-26 01:17:27 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-18 15:59:59 -0400
commitbf30690029a3b8572a6fc2facb77fbde86992988 (patch)
tree6be672e18189c806c210d6ded581cee38f9c1524 /drivers/media/platform
parent4458a54c5edce2a9bdf826273ceb7f4b3b7278c6 (diff)
[media] Media: remove incorrect __init/__exit markups
Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Similarly probe() methods should not be marked __init unless platform_driver_probe() is used. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Timo Kokkonen <timo.t.kokkonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/soc_camera/omap1_camera.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/soc_camera/omap1_camera.c b/drivers/media/platform/soc_camera/omap1_camera.c
index 2547bf88f79f..9689a6e89b7f 100644
--- a/drivers/media/platform/soc_camera/omap1_camera.c
+++ b/drivers/media/platform/soc_camera/omap1_camera.c
@@ -1546,7 +1546,7 @@ static struct soc_camera_host_ops omap1_host_ops = {
1546 .poll = omap1_cam_poll, 1546 .poll = omap1_cam_poll,
1547}; 1547};
1548 1548
1549static int __init omap1_cam_probe(struct platform_device *pdev) 1549static int omap1_cam_probe(struct platform_device *pdev)
1550{ 1550{
1551 struct omap1_cam_dev *pcdev; 1551 struct omap1_cam_dev *pcdev;
1552 struct resource *res; 1552 struct resource *res;
@@ -1677,7 +1677,7 @@ exit:
1677 return err; 1677 return err;
1678} 1678}
1679 1679
1680static int __exit omap1_cam_remove(struct platform_device *pdev) 1680static int omap1_cam_remove(struct platform_device *pdev)
1681{ 1681{
1682 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); 1682 struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev);
1683 struct omap1_cam_dev *pcdev = container_of(soc_host, 1683 struct omap1_cam_dev *pcdev = container_of(soc_host,
@@ -1709,7 +1709,7 @@ static struct platform_driver omap1_cam_driver = {
1709 .name = DRIVER_NAME, 1709 .name = DRIVER_NAME,
1710 }, 1710 },
1711 .probe = omap1_cam_probe, 1711 .probe = omap1_cam_probe,
1712 .remove = __exit_p(omap1_cam_remove), 1712 .remove = omap1_cam_remove,
1713}; 1713};
1714 1714
1715module_platform_driver(omap1_cam_driver); 1715module_platform_driver(omap1_cam_driver);