Loading drivers/media/video/videodev.c +10 −12 Original line number Original line Diff line number Diff line Loading @@ -392,6 +392,12 @@ static ssize_t show_name(struct device *cd, return sprintf(buf, "%.*s\n", (int)sizeof(vfd->name), vfd->name); return sprintf(buf, "%.*s\n", (int)sizeof(vfd->name), vfd->name); } } static struct device_attribute video_device_attrs[] = { __ATTR(name, S_IRUGO, show_name, NULL), __ATTR(index, S_IRUGO, show_index, NULL), __ATTR_NULL }; struct video_device *video_device_alloc(void) struct video_device *video_device_alloc(void) { { struct video_device *vfd; struct video_device *vfd; Loading Loading @@ -420,12 +426,6 @@ static void video_release(struct device *cd) vfd->release(vfd); vfd->release(vfd); } } static struct device_attribute video_device_attrs[] = { __ATTR(name, S_IRUGO, show_name, NULL), __ATTR(index, S_IRUGO, show_index, NULL), __ATTR_NULL }; static struct class video_class = { static struct class video_class = { .name = VIDEO_NAME, .name = VIDEO_NAME, .dev_attrs = video_device_attrs, .dev_attrs = video_device_attrs, Loading Loading @@ -2173,8 +2173,7 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, ret = get_index(vfd, index); ret = get_index(vfd, index); if (ret < 0) { if (ret < 0) { printk(KERN_ERR "%s: get_index failed\n", printk(KERN_ERR "%s: get_index failed\n", __func__); __func__); goto fail_minor; goto fail_minor; } } Loading @@ -2185,15 +2184,14 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, /* sysfs class */ /* sysfs class */ memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); if (vfd->dev) vfd->class_dev.parent = vfd->dev; vfd->class_dev.class = &video_class; vfd->class_dev.class = &video_class; vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); if (vfd->dev) vfd->class_dev.parent = vfd->dev; sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); ret = device_register(&vfd->class_dev); ret = device_register(&vfd->class_dev); if (ret < 0) { if (ret < 0) { printk(KERN_ERR "%s: device_register failed\n", printk(KERN_ERR "%s: device_register failed\n", __func__); __func__); goto fail_minor; goto fail_minor; } } Loading include/media/v4l2-dev.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -375,7 +375,7 @@ video_device_create_file(struct video_device *vfd, { { int ret = device_create_file(&vfd->class_dev, attr); int ret = device_create_file(&vfd->class_dev, attr); if (ret < 0) if (ret < 0) printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); printk(KERN_WARNING "%s error: %d\n", __func__, ret); return ret; return ret; } } static inline void static inline void Loading Loading
drivers/media/video/videodev.c +10 −12 Original line number Original line Diff line number Diff line Loading @@ -392,6 +392,12 @@ static ssize_t show_name(struct device *cd, return sprintf(buf, "%.*s\n", (int)sizeof(vfd->name), vfd->name); return sprintf(buf, "%.*s\n", (int)sizeof(vfd->name), vfd->name); } } static struct device_attribute video_device_attrs[] = { __ATTR(name, S_IRUGO, show_name, NULL), __ATTR(index, S_IRUGO, show_index, NULL), __ATTR_NULL }; struct video_device *video_device_alloc(void) struct video_device *video_device_alloc(void) { { struct video_device *vfd; struct video_device *vfd; Loading Loading @@ -420,12 +426,6 @@ static void video_release(struct device *cd) vfd->release(vfd); vfd->release(vfd); } } static struct device_attribute video_device_attrs[] = { __ATTR(name, S_IRUGO, show_name, NULL), __ATTR(index, S_IRUGO, show_index, NULL), __ATTR_NULL }; static struct class video_class = { static struct class video_class = { .name = VIDEO_NAME, .name = VIDEO_NAME, .dev_attrs = video_device_attrs, .dev_attrs = video_device_attrs, Loading Loading @@ -2173,8 +2173,7 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, ret = get_index(vfd, index); ret = get_index(vfd, index); if (ret < 0) { if (ret < 0) { printk(KERN_ERR "%s: get_index failed\n", printk(KERN_ERR "%s: get_index failed\n", __func__); __func__); goto fail_minor; goto fail_minor; } } Loading @@ -2185,15 +2184,14 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, /* sysfs class */ /* sysfs class */ memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); if (vfd->dev) vfd->class_dev.parent = vfd->dev; vfd->class_dev.class = &video_class; vfd->class_dev.class = &video_class; vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); if (vfd->dev) vfd->class_dev.parent = vfd->dev; sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); ret = device_register(&vfd->class_dev); ret = device_register(&vfd->class_dev); if (ret < 0) { if (ret < 0) { printk(KERN_ERR "%s: device_register failed\n", printk(KERN_ERR "%s: device_register failed\n", __func__); __func__); goto fail_minor; goto fail_minor; } } Loading
include/media/v4l2-dev.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -375,7 +375,7 @@ video_device_create_file(struct video_device *vfd, { { int ret = device_create_file(&vfd->class_dev, attr); int ret = device_create_file(&vfd->class_dev, attr); if (ret < 0) if (ret < 0) printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); printk(KERN_WARNING "%s error: %d\n", __func__, ret); return ret; return ret; } } static inline void static inline void Loading