diff options
Diffstat (limited to 'linux/drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-driver.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 81bb9fe9b..99cb475cd 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -166,13 +166,18 @@ MODULE_LICENSE("GPL"); /* sysfs */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) +static ssize_t show_card(struct device *cd, + struct device_attribute *attr, char *buf) +#else static ssize_t show_card(struct class_device *cd, char *buf) +#endif { struct video_device *vfd = to_video_device(cd); struct bttv *btv = dev_get_drvdata(vfd->dev); return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET); } -static CLASS_DEVICE_ATTR(card, S_IRUGO, show_card, NULL); +static DEVICE_ATTR(card, S_IRUGO, show_card, NULL); #endif /* ----------------------------------------------------------------------- */ @@ -4664,9 +4669,9 @@ static int __devinit bttv_register_video(struct bttv *btv) goto err; printk(KERN_INFO "bttv%d: registered device video%d\n", btv->c.nr,btv->video_dev->minor & 0x1f); - if (class_device_create_file(&btv->video_dev->class_dev, - &class_device_attr_card)<0) { - printk(KERN_ERR "bttv%d: class_device_create_file 'card' " + if (device_create_file(&btv->video_dev->class_dev, + &dev_attr_card)<0) { + printk(KERN_ERR "bttv%d: device_create_file 'card' " "failed\n", btv->c.nr); goto err; } |