aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/v4l2-dev.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index fda48a2efda6..ff219df4b725 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -84,11 +84,6 @@ static void video_release(struct device *cd)
84{ 84{
85 struct video_device *vfd = container_of(cd, struct video_device, dev); 85 struct video_device *vfd = container_of(cd, struct video_device, dev);
86 86
87#if 1
88 /* needed until all drivers are fixed */
89 if (!vfd->release)
90 return;
91#endif
92 vfd->release(vfd); 87 vfd->release(vfd);
93} 88}
94 89
@@ -233,8 +228,8 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
233 int ret; 228 int ret;
234 char *name_base; 229 char *name_base;
235 230
236 if (vfd == NULL) 231 /* the release callback MUST be present */
237 return -EINVAL; 232 BUG_ON(!vfd->release);
238 233
239 if (vfd == NULL) 234 if (vfd == NULL)
240 return -EINVAL; 235 return -EINVAL;
@@ -312,13 +307,6 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
312 goto fail_minor; 307 goto fail_minor;
313 } 308 }
314 309
315#if 1
316 /* needed until all drivers are fixed */
317 if (!vfd->release)
318 printk(KERN_WARNING "videodev: \"%s\" has no release callback. "
319 "Please fix your driver for proper sysfs support, see "
320 "http://lwn.net/Articles/36850/\n", vfd->name);
321#endif
322 return 0; 310 return 0;
323 311
324fail_minor: 312fail_minor: