Commit a24ddee3 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (9351): ibmcam: Fix a regression caused by a482f327

As reported by David Ellingsworth:
> I'm not sure if it matters or not, but the ibmcam driver in the
> Mauro's linux-2.6 git tree in the for_linus branch is currently
> broken.

uvd is equal to NULL during most of ibmcam_probe. Due to that, an OOPS is
generated at dev_info. This patch replaces uvd->dev->dev to dev->dev
inside this routine.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Reviewed-by: default avatarDavid Ellingsworth <david@identd.dyndns.org>
parent 69df96c3
...@@ -3695,7 +3695,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -3695,7 +3695,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
unsigned char video_ep = 0; unsigned char video_ep = 0;
if (debug >= 1) if (debug >= 1)
dev_info(&uvd->dev->dev, "ibmcam_probe(%p,%u.)\n", intf, ifnum); dev_info(&dev->dev, "ibmcam_probe(%p,%u.)\n", intf, ifnum);
/* We don't handle multi-config cameras */ /* We don't handle multi-config cameras */
if (dev->descriptor.bNumConfigurations != 1) if (dev->descriptor.bNumConfigurations != 1)
...@@ -3746,7 +3746,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -3746,7 +3746,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
brand = "IBM PC Camera"; /* a.k.a. Xirlink C-It */ brand = "IBM PC Camera"; /* a.k.a. Xirlink C-It */
break; break;
} }
dev_info(&uvd->dev->dev, dev_info(&dev->dev,
"%s USB camera found (model %d, rev. 0x%04x)\n", "%s USB camera found (model %d, rev. 0x%04x)\n",
brand, model, le16_to_cpu(dev->descriptor.bcdDevice)); brand, model, le16_to_cpu(dev->descriptor.bcdDevice));
} while (0); } while (0);
...@@ -3754,7 +3754,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -3754,7 +3754,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
/* Validate found interface: must have one ISO endpoint */ /* Validate found interface: must have one ISO endpoint */
nas = intf->num_altsetting; nas = intf->num_altsetting;
if (debug > 0) if (debug > 0)
dev_info(&uvd->dev->dev, "Number of alternate settings=%d.\n", dev_info(&dev->dev, "Number of alternate settings=%d.\n",
nas); nas);
if (nas < 2) { if (nas < 2) {
err("Too few alternate settings for this camera!"); err("Too few alternate settings for this camera!");
...@@ -3799,7 +3799,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -3799,7 +3799,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
actInterface = i; actInterface = i;
maxPS = le16_to_cpu(endpoint->wMaxPacketSize); maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
if (debug > 0) if (debug > 0)
dev_info(&uvd->dev->dev, dev_info(&dev->dev,
"Active setting=%d. " "Active setting=%d. "
"maxPS=%d.\n", i, maxPS); "maxPS=%d.\n", i, maxPS);
} else } else
...@@ -3840,7 +3840,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -3840,7 +3840,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
RESTRICT_TO_RANGE(framerate, 0, 5); RESTRICT_TO_RANGE(framerate, 0, 5);
break; break;
default: default:
dev_info(&uvd->dev->dev, "IBM camera: using 320x240\n"); dev_info(&dev->dev, "IBM camera: using 320x240\n");
size = SIZE_320x240; size = SIZE_320x240;
/* No break here */ /* No break here */
case SIZE_320x240: case SIZE_320x240:
...@@ -3869,7 +3869,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -3869,7 +3869,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
canvasY = 120; canvasY = 120;
break; break;
default: default:
dev_info(&uvd->dev->dev, "IBM NetCamera: using 176x144\n"); dev_info(&dev->dev, "IBM NetCamera: using 176x144\n");
size = SIZE_176x144; size = SIZE_176x144;
/* No break here */ /* No break here */
case SIZE_176x144: case SIZE_176x144:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment