diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-02-26 01:17:27 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-18 15:59:59 -0400 |
commit | bf30690029a3b8572a6fc2facb77fbde86992988 (patch) | |
tree | 6be672e18189c806c210d6ded581cee38f9c1524 /drivers/media | |
parent | 4458a54c5edce2a9bdf826273ceb7f4b3b7278c6 (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')
-rw-r--r-- | drivers/media/i2c/adp1653.c | 4 | ||||
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/soc_camera/omap1_camera.c | 6 | ||||
-rw-r--r-- | drivers/media/radio/radio-si4713.c | 4 | ||||
-rw-r--r-- | drivers/media/rc/ir-rx51.c | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c index df163800c8e1..ef75abe5984c 100644 --- a/drivers/media/i2c/adp1653.c +++ b/drivers/media/i2c/adp1653.c | |||
@@ -447,7 +447,7 @@ free_and_quit: | |||
447 | return ret; | 447 | return ret; |
448 | } | 448 | } |
449 | 449 | ||
450 | static int __exit adp1653_remove(struct i2c_client *client) | 450 | static int adp1653_remove(struct i2c_client *client) |
451 | { | 451 | { |
452 | struct v4l2_subdev *subdev = i2c_get_clientdata(client); | 452 | struct v4l2_subdev *subdev = i2c_get_clientdata(client); |
453 | struct adp1653_flash *flash = to_adp1653_flash(subdev); | 453 | struct adp1653_flash *flash = to_adp1653_flash(subdev); |
@@ -476,7 +476,7 @@ static struct i2c_driver adp1653_i2c_driver = { | |||
476 | .pm = &adp1653_pm_ops, | 476 | .pm = &adp1653_pm_ops, |
477 | }, | 477 | }, |
478 | .probe = adp1653_probe, | 478 | .probe = adp1653_probe, |
479 | .remove = __exit_p(adp1653_remove), | 479 | .remove = adp1653_remove, |
480 | .id_table = adp1653_id_table, | 480 | .id_table = adp1653_id_table, |
481 | }; | 481 | }; |
482 | 482 | ||
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 83c7ed7ffcc2..cae4f4683851 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c | |||
@@ -2833,7 +2833,7 @@ static int smiapp_probe(struct i2c_client *client, | |||
2833 | sensor->src->pads, 0); | 2833 | sensor->src->pads, 0); |
2834 | } | 2834 | } |
2835 | 2835 | ||
2836 | static int __exit smiapp_remove(struct i2c_client *client) | 2836 | static int smiapp_remove(struct i2c_client *client) |
2837 | { | 2837 | { |
2838 | struct v4l2_subdev *subdev = i2c_get_clientdata(client); | 2838 | struct v4l2_subdev *subdev = i2c_get_clientdata(client); |
2839 | struct smiapp_sensor *sensor = to_smiapp_sensor(subdev); | 2839 | struct smiapp_sensor *sensor = to_smiapp_sensor(subdev); |
@@ -2881,7 +2881,7 @@ static struct i2c_driver smiapp_i2c_driver = { | |||
2881 | .pm = &smiapp_pm_ops, | 2881 | .pm = &smiapp_pm_ops, |
2882 | }, | 2882 | }, |
2883 | .probe = smiapp_probe, | 2883 | .probe = smiapp_probe, |
2884 | .remove = __exit_p(smiapp_remove), | 2884 | .remove = smiapp_remove, |
2885 | .id_table = smiapp_id_table, | 2885 | .id_table = smiapp_id_table, |
2886 | }; | 2886 | }; |
2887 | 2887 | ||
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 | ||
1549 | static int __init omap1_cam_probe(struct platform_device *pdev) | 1549 | static 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 | ||
1680 | static int __exit omap1_cam_remove(struct platform_device *pdev) | 1680 | static 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 | ||
1715 | module_platform_driver(omap1_cam_driver); | 1715 | module_platform_driver(omap1_cam_driver); |
diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c index 1507c9d508d7..8ae8442d6f97 100644 --- a/drivers/media/radio/radio-si4713.c +++ b/drivers/media/radio/radio-si4713.c | |||
@@ -328,7 +328,7 @@ exit: | |||
328 | } | 328 | } |
329 | 329 | ||
330 | /* radio_si4713_pdriver_remove - remove the device */ | 330 | /* radio_si4713_pdriver_remove - remove the device */ |
331 | static int __exit radio_si4713_pdriver_remove(struct platform_device *pdev) | 331 | static int radio_si4713_pdriver_remove(struct platform_device *pdev) |
332 | { | 332 | { |
333 | struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); | 333 | struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); |
334 | struct radio_si4713_device *rsdev = container_of(v4l2_dev, | 334 | struct radio_si4713_device *rsdev = container_of(v4l2_dev, |
@@ -350,7 +350,7 @@ static struct platform_driver radio_si4713_pdriver = { | |||
350 | .name = "radio-si4713", | 350 | .name = "radio-si4713", |
351 | }, | 351 | }, |
352 | .probe = radio_si4713_pdriver_probe, | 352 | .probe = radio_si4713_pdriver_probe, |
353 | .remove = __exit_p(radio_si4713_pdriver_remove), | 353 | .remove = radio_si4713_pdriver_remove, |
354 | }; | 354 | }; |
355 | 355 | ||
356 | module_platform_driver(radio_si4713_pdriver); | 356 | module_platform_driver(radio_si4713_pdriver); |
diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 8ead492d03aa..31b955bf7664 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c | |||
@@ -464,14 +464,14 @@ static int lirc_rx51_probe(struct platform_device *dev) | |||
464 | return 0; | 464 | return 0; |
465 | } | 465 | } |
466 | 466 | ||
467 | static int __exit lirc_rx51_remove(struct platform_device *dev) | 467 | static int lirc_rx51_remove(struct platform_device *dev) |
468 | { | 468 | { |
469 | return lirc_unregister_driver(lirc_rx51_driver.minor); | 469 | return lirc_unregister_driver(lirc_rx51_driver.minor); |
470 | } | 470 | } |
471 | 471 | ||
472 | struct platform_driver lirc_rx51_platform_driver = { | 472 | struct platform_driver lirc_rx51_platform_driver = { |
473 | .probe = lirc_rx51_probe, | 473 | .probe = lirc_rx51_probe, |
474 | .remove = __exit_p(lirc_rx51_remove), | 474 | .remove = lirc_rx51_remove, |
475 | .suspend = lirc_rx51_suspend, | 475 | .suspend = lirc_rx51_suspend, |
476 | .resume = lirc_rx51_resume, | 476 | .resume = lirc_rx51_resume, |
477 | .driver = { | 477 | .driver = { |