aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2009-11-27 11:57:30 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-15 21:17:56 -0500
commitf0813b4c9f7ffbeaddcba1c08a1812f7ff30e1b7 (patch)
tree6bee13e029a382236f5e54402e054b271350c0fe /drivers/media/video/cx231xx
parent957b4aa9f786cf04585a690a2e4c3dc867ce80e9 (diff)
V4L/DVB (13553): v4l: Use the video_is_registered function in device drivers
Fix all device drivers to use the video_is_registered function instead of checking video_device::minor. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-video.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c
index 1c7f84e203e6..71e152dc2791 100644
--- a/drivers/media/video/cx231xx/cx231xx-video.c
+++ b/drivers/media/video/cx231xx/cx231xx-video.c
@@ -2020,7 +2020,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev)
2020 /*FIXME: I2C IR should be disconnected */ 2020 /*FIXME: I2C IR should be disconnected */
2021 2021
2022 if (dev->radio_dev) { 2022 if (dev->radio_dev) {
2023 if (-1 != dev->radio_dev->minor) 2023 if (video_is_registered(dev->radio_dev))
2024 video_unregister_device(dev->radio_dev); 2024 video_unregister_device(dev->radio_dev);
2025 else 2025 else
2026 video_device_release(dev->radio_dev); 2026 video_device_release(dev->radio_dev);
@@ -2029,7 +2029,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev)
2029 if (dev->vbi_dev) { 2029 if (dev->vbi_dev) {
2030 cx231xx_info("V4L2 device %s deregistered\n", 2030 cx231xx_info("V4L2 device %s deregistered\n",
2031 video_device_node_name(dev->vbi_dev)); 2031 video_device_node_name(dev->vbi_dev));
2032 if (-1 != dev->vbi_dev->minor) 2032 if (video_is_registered(dev->vbi_dev))
2033 video_unregister_device(dev->vbi_dev); 2033 video_unregister_device(dev->vbi_dev);
2034 else 2034 else
2035 video_device_release(dev->vbi_dev); 2035 video_device_release(dev->vbi_dev);
@@ -2038,7 +2038,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev)
2038 if (dev->vdev) { 2038 if (dev->vdev) {
2039 cx231xx_info("V4L2 device %s deregistered\n", 2039 cx231xx_info("V4L2 device %s deregistered\n",
2040 video_device_node_name(dev->vdev)); 2040 video_device_node_name(dev->vdev));
2041 if (-1 != dev->vdev->minor) 2041 if (video_is_registered(dev->vdev))
2042 video_unregister_device(dev->vdev); 2042 video_unregister_device(dev->vdev);
2043 else 2043 else
2044 video_device_release(dev->vdev); 2044 video_device_release(dev->vdev);