diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-24 08:35:23 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-24 08:35:23 -0200 |
commit | 18efb709ad3602aebb032ef3f23aba5d45a44d38 (patch) | |
tree | bbcd724ecf5864b723f46e7463a8a0c310fa79d4 /linux/drivers/media/video/bt8xx/bttv-driver.c | |
parent | 31674e74f8cbf0314f12262b769aa8254e49805f (diff) | |
parent | c73a2ef55808dad64c72bdc00490c63333b8351c (diff) | |
download | mediapointer-dvb-s2-18efb709ad3602aebb032ef3f23aba5d45a44d38.tar.gz mediapointer-dvb-s2-18efb709ad3602aebb032ef3f23aba5d45a44d38.tar.bz2 |
merge http://linuxtv.org/hg/~mkrufky/windham
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-driver.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 09188617b..e398de6c1 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -163,14 +163,22 @@ MODULE_LICENSE("GPL"); /* ----------------------------------------------------------------------- */ /* sysfs */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) 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 = container_of(cd, struct video_device, dev); struct bttv *btv = dev_get_drvdata(vfd->parent); return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) static DEVICE_ATTR(card, S_IRUGO, show_card, NULL); +#else +static CLASS_DEVICE_ATTR(card, S_IRUGO, show_card, NULL); +#endif /* ----------------------------------------------------------------------- */ /* dvb auto-load setup */ @@ -4089,7 +4097,7 @@ bttv_irq_switch_vbi(struct bttv *btv) spin_unlock(&btv->s_lock); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs) #else static irqreturn_t bttv_irq(int irq, void *dev_id) @@ -4271,8 +4279,13 @@ 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->num); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) + if (class_device_create_file(&btv->video_dev->dev, + &class_device_attr_card)<0) { +#else if (device_create_file(&btv->video_dev->dev, &dev_attr_card)<0) { +#endif printk(KERN_ERR "bttv%d: device_create_file 'card' " "failed\n", btv->c.nr); goto err; |