aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-10-08 15:26:13 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 23:03:14 -0400
commit54bd5b66c87d14e250f108aad1228b905d6882f6 (patch)
tree2ecb78046819e2c9da176a74e4e9fbc8097031be /drivers/media/video/bt8xx
parentd4cae5a50021271b9ef4e5e39e71e177d12fa8cb (diff)
V4L/DVB (6293): V4L: convert struct class_device to struct device
The currently used "struct class_device" will be removed from the kernel. Here is a patch that converts all users in drivers/media/video/ to struct device. Reviewed-by: Thierry Merle <thierry.merle@free.fr> Reviewed-by: Mike Isely <isely@pobox.com> Reviewed-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt8xx')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 4ab4e14b5c64..49278537eec4 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -154,13 +154,14 @@ MODULE_LICENSE("GPL");
154/* ----------------------------------------------------------------------- */ 154/* ----------------------------------------------------------------------- */
155/* sysfs */ 155/* sysfs */
156 156
157static ssize_t show_card(struct class_device *cd, char *buf) 157static ssize_t show_card(struct device *cd,
158 struct device_attribute *attr, char *buf)
158{ 159{
159 struct video_device *vfd = to_video_device(cd); 160 struct video_device *vfd = to_video_device(cd);
160 struct bttv *btv = dev_get_drvdata(vfd->dev); 161 struct bttv *btv = dev_get_drvdata(vfd->dev);
161 return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET); 162 return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
162} 163}
163static CLASS_DEVICE_ATTR(card, S_IRUGO, show_card, NULL); 164static DEVICE_ATTR(card, S_IRUGO, show_card, NULL);
164 165
165/* ----------------------------------------------------------------------- */ 166/* ----------------------------------------------------------------------- */
166/* dvb auto-load setup */ 167/* dvb auto-load setup */
@@ -4615,9 +4616,9 @@ static int __devinit bttv_register_video(struct bttv *btv)
4615 goto err; 4616 goto err;
4616 printk(KERN_INFO "bttv%d: registered device video%d\n", 4617 printk(KERN_INFO "bttv%d: registered device video%d\n",
4617 btv->c.nr,btv->video_dev->minor & 0x1f); 4618 btv->c.nr,btv->video_dev->minor & 0x1f);
4618 if (class_device_create_file(&btv->video_dev->class_dev, 4619 if (device_create_file(&btv->video_dev->class_dev,
4619 &class_device_attr_card)<0) { 4620 &dev_attr_card)<0) {
4620 printk(KERN_ERR "bttv%d: class_device_create_file 'card' " 4621 printk(KERN_ERR "bttv%d: device_create_file 'card' "
4621 "failed\n", btv->c.nr); 4622 "failed\n", btv->c.nr);
4622 goto err; 4623 goto err;
4623 } 4624 }