[PATCH] videodev: pass dev_t to the class core

From: Greg KH
Date: Wed Mar 09 2005 - 22:45:02 EST


ChangeSet 1.2044, 2005/03/09 09:52:10-08:00, kay.sievers@xxxxxxxx

[PATCH] videodev: pass dev_t to the class core

Signed-off-by: Kay Sievers <kay.sievers@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>


drivers/media/video/videodev.c | 11 +----------
1 files changed, 1 insertion(+), 10 deletions(-)


diff -Nru a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
--- a/drivers/media/video/videodev.c 2005-03-09 16:29:20 -08:00
+++ b/drivers/media/video/videodev.c 2005-03-09 16:29:20 -08:00
@@ -46,15 +46,7 @@
return sprintf(buf,"%.*s\n",(int)sizeof(vfd->name),vfd->name);
}

-static ssize_t show_dev(struct class_device *cd, char *buf)
-{
- struct video_device *vfd = container_of(cd, struct video_device, class_dev);
- dev_t dev = MKDEV(VIDEO_MAJOR, vfd->minor);
- return print_dev_t(buf,dev);
-}
-
static CLASS_DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);

struct video_device *video_device_alloc(void)
{
@@ -347,12 +339,11 @@
if (vfd->dev)
vfd->class_dev.dev = vfd->dev;
vfd->class_dev.class = &video_class;
+ vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
strlcpy(vfd->class_dev.class_id, vfd->devfs_name + 4, BUS_ID_SIZE);
class_device_register(&vfd->class_dev);
class_device_create_file(&vfd->class_dev,
&class_device_attr_name);
- class_device_create_file(&vfd->class_dev,
- &class_device_attr_dev);

#if 1 /* needed until all drivers are fixed */
if (!vfd->release)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/