* [PATCH 6/7] videodev: pass dev_t to the class core
@ 2005-01-23 4:26 Kay Sievers
0 siblings, 0 replies; only message in thread
From: Kay Sievers @ 2005-01-23 4:26 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg KH
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
===== drivers/media/video/videodev.c 1.35 vs edited =====
--- 1.35/drivers/media/video/videodev.c 2004-08-23 10:14:55 +02:00
+++ edited/drivers/media/video/videodev.c 2005-01-22 15:22:49 +01:00
@@ -46,15 +46,7 @@ static ssize_t show_name(struct class_de
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 @@ int video_register_device(struct video_d
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-23 4:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-23 4:26 [PATCH 6/7] videodev: pass dev_t to the class core Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®