aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/au0828/au0828-core.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@linuxtv.org>2009-03-11 03:01:01 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:26 -0300
commit220be77c6e4302207c34afc78a98b4994f92f6e5 (patch)
tree718563a237cfe56fb495d195092929446a1e725e /drivers/media/video/au0828/au0828-core.c
parentfc4ce6cd9855dcd1151a9afc067ea354179089f9 (diff)
V4L/DVB (11078): au0828: properly handle non-existent analog inputs
It is not valid to look for dev->board.input == NULL to detect an undefined analog configuration section, since it is a member of the struct and not a pointer (hence it will *always* be non-NULL). Do the check based on whether the first input is actually a valid input type instead. Thanks to Michael Krufky <mkrufky@linuxtv.org> for providing sample hardware of various configurations to test with. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c
index 2b5ade626e5..5199c8aa588 100644
--- a/drivers/media/video/au0828/au0828-core.c
+++ b/drivers/media/video/au0828/au0828-core.c
@@ -146,7 +146,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
/* Digital TV */
au0828_dvb_unregister(dev);
- if (dev->board.input != NULL)
+ if (AUVI_INPUT(0).type != AU0828_VMUX_UNDEFINED)
au0828_analog_unregister(dev);
/* I2C */
@@ -205,7 +205,7 @@ static int au0828_usb_probe(struct usb_interface *interface,
au0828_card_setup(dev);
/* Analog TV */
- if (dev->board.input != NULL)
+ if (AUVI_INPUT(0).type != AU0828_VMUX_UNDEFINED)
au0828_analog_register(dev, interface);
/* Digital TV */