summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-01-01 21:20:14 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-06 12:04:17 +0100
commit5dae603d84ff5b6b24186b521f4353b3860b11e2 (patch)
tree6bd98d21a98c06742865d2ee59bcaefd00c12749 /drivers/media/video/gspca/gspca.c
parent[media] gspca - main: Take numerator into account in fps calculations (diff)
downloadlinux-5dae603d84ff5b6b24186b521f4353b3860b11e2.tar.xz
linux-5dae603d84ff5b6b24186b521f4353b3860b11e2.zip
[media] gspca: Check dev->actconfig rather than dev->config
Check dev->actconfig rather than dev->config when checking various configuration things. dev->config points to the array of configs for the device so dev->config->foo boils down to dev->config[0].foo and the first config is not necessarily always the active config. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r--drivers/media/video/gspca/gspca.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 4767f159b62a..338dae448787 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -2313,12 +2313,12 @@ int gspca_dev_probe2(struct usb_interface *intf,
gspca_dev->iface = intf->cur_altsetting->desc.bInterfaceNumber;
/* check if any audio device */
- if (dev->config->desc.bNumInterfaces != 1) {
+ if (dev->actconfig->desc.bNumInterfaces != 1) {
int i;
struct usb_interface *intf2;
- for (i = 0; i < dev->config->desc.bNumInterfaces; i++) {
- intf2 = dev->config->interface[i];
+ for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
+ intf2 = dev->actconfig->interface[i];
if (intf2 != NULL
&& intf2->altsetting != NULL
&& intf2->altsetting->desc.bInterfaceClass ==
@@ -2399,7 +2399,7 @@ int gspca_dev_probe(struct usb_interface *intf,
}
/* the USB video interface must be the first one */
- if (dev->config->desc.bNumInterfaces != 1
+ if (dev->actconfig->desc.bNumInterfaces != 1
&& intf->cur_altsetting->desc.bInterfaceNumber != 0)
return -ENODEV;