summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/au0828/au0828-core.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@linuxtv.org>2009-03-11 03:00:47 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:25 -0300
commitf1add5b5ec2a6efaa0f5648d0dc2c56d83a3ecf8 (patch)
tree2d44c29f61576e3b6ac88219a726415d9edd3a3b /drivers/media/video/au0828/au0828-core.c
parent4ff5ed44f84aed6727ec226853a1c6b03c36db5e (diff)
downloadlinux-stable-f1add5b5ec2a6efaa0f5648d0dc2c56d83a3ecf8.tar.gz
linux-stable-f1add5b5ec2a6efaa0f5648d0dc2c56d83a3ecf8.tar.bz2
linux-stable-f1add5b5ec2a6efaa0f5648d0dc2c56d83a3ecf8.zip
V4L/DVB (11070): au0828: Rework the way the analog video binding occurs
Rework the way boards are managed so that we can change the board description based on the Hauppauge eeprom (modeled after cx88-cards.c). Also, make sure that we don't load the analog stack if there are no analog inputs defined in the board profile. Thanks to Michael Krufky <mkrufky@linuxtv.org> for providing information on the various ways different Hauppauge boards can be configured. Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/au0828/au0828-core.c')
-rw-r--r--drivers/media/video/au0828/au0828-core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c
index 680e88f61397..0bc85b7d67d4 100644
--- a/drivers/media/video/au0828/au0828-core.c
+++ b/drivers/media/video/au0828/au0828-core.c
@@ -146,7 +146,8 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
/* Digital TV */
au0828_dvb_unregister(dev);
- au0828_analog_unregister(dev);
+ if (dev->board.input != NULL)
+ au0828_analog_unregister(dev);
/* I2C */
au0828_i2c_unregister(dev);
@@ -189,7 +190,7 @@ static int au0828_usb_probe(struct usb_interface *interface,
mutex_init(&dev->mutex);
mutex_init(&dev->dvb.lock);
dev->usbdev = usbdev;
- dev->board = id->driver_info;
+ dev->boardnr = id->driver_info;
usb_set_intfdata(interface, dev);
@@ -230,14 +231,14 @@ static int au0828_usb_probe(struct usb_interface *interface,
au0828_card_setup(dev);
/* Analog TV */
- au0828_analog_register(dev);
+ if (dev->board.input != NULL)
+ au0828_analog_register(dev);
/* Digital TV */
au0828_dvb_register(dev);
printk(KERN_INFO "Registered device AU0828 [%s]\n",
- au0828_boards[dev->board].name == NULL ? "Unset" :
- au0828_boards[dev->board].name);
+ dev->board.name == NULL ? "Unset" : dev->board.name);
return 0;
}