diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-23 08:53:56 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-11 05:11:19 -0500 |
commit | a24ddee36ca10a90451552e6620ff7c4ff7e44b5 (patch) | |
tree | 32bf4ccaef6d816a40855e25d9da2b5dab765134 /drivers/media/video | |
parent | 69df96c3dad0704301cdbd665636d8184fb314c6 (diff) |
V4L/DVB (9351): ibmcam: Fix a regression caused by a482f327ff56bc3cf53176a7eb736cea47291a1d
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: Mauro Carvalho Chehab <mchehab@redhat.com>
Reviewed-by: David Ellingsworth <david@identd.dyndns.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/usbvideo/ibmcam.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/usbvideo/ibmcam.c b/drivers/media/video/usbvideo/ibmcam.c index 28421d386f1e..c710bcd1df48 100644 --- a/drivers/media/video/usbvideo/ibmcam.c +++ b/drivers/media/video/usbvideo/ibmcam.c | |||
@@ -3695,7 +3695,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * | |||
3695 | unsigned char video_ep = 0; | 3695 | unsigned char video_ep = 0; |
3696 | 3696 | ||
3697 | if (debug >= 1) | 3697 | if (debug >= 1) |
3698 | dev_info(&uvd->dev->dev, "ibmcam_probe(%p,%u.)\n", intf, ifnum); | 3698 | dev_info(&dev->dev, "ibmcam_probe(%p,%u.)\n", intf, ifnum); |
3699 | 3699 | ||
3700 | /* We don't handle multi-config cameras */ | 3700 | /* We don't handle multi-config cameras */ |
3701 | if (dev->descriptor.bNumConfigurations != 1) | 3701 | if (dev->descriptor.bNumConfigurations != 1) |
@@ -3746,7 +3746,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * | |||
3746 | brand = "IBM PC Camera"; /* a.k.a. Xirlink C-It */ | 3746 | brand = "IBM PC Camera"; /* a.k.a. Xirlink C-It */ |
3747 | break; | 3747 | break; |
3748 | } | 3748 | } |
3749 | dev_info(&uvd->dev->dev, | 3749 | dev_info(&dev->dev, |
3750 | "%s USB camera found (model %d, rev. 0x%04x)\n", | 3750 | "%s USB camera found (model %d, rev. 0x%04x)\n", |
3751 | brand, model, le16_to_cpu(dev->descriptor.bcdDevice)); | 3751 | brand, model, le16_to_cpu(dev->descriptor.bcdDevice)); |
3752 | } while (0); | 3752 | } while (0); |
@@ -3754,7 +3754,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * | |||
3754 | /* Validate found interface: must have one ISO endpoint */ | 3754 | /* Validate found interface: must have one ISO endpoint */ |
3755 | nas = intf->num_altsetting; | 3755 | nas = intf->num_altsetting; |
3756 | if (debug > 0) | 3756 | if (debug > 0) |
3757 | dev_info(&uvd->dev->dev, "Number of alternate settings=%d.\n", | 3757 | dev_info(&dev->dev, "Number of alternate settings=%d.\n", |
3758 | nas); | 3758 | nas); |
3759 | if (nas < 2) { | 3759 | if (nas < 2) { |
3760 | err("Too few alternate settings for this camera!"); | 3760 | 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 | actInterface = i; | 3799 | actInterface = i; |
3800 | maxPS = le16_to_cpu(endpoint->wMaxPacketSize); | 3800 | maxPS = le16_to_cpu(endpoint->wMaxPacketSize); |
3801 | if (debug > 0) | 3801 | if (debug > 0) |
3802 | dev_info(&uvd->dev->dev, | 3802 | dev_info(&dev->dev, |
3803 | "Active setting=%d. " | 3803 | "Active setting=%d. " |
3804 | "maxPS=%d.\n", i, maxPS); | 3804 | "maxPS=%d.\n", i, maxPS); |
3805 | } else | 3805 | } else |
@@ -3840,7 +3840,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * | |||
3840 | RESTRICT_TO_RANGE(framerate, 0, 5); | 3840 | RESTRICT_TO_RANGE(framerate, 0, 5); |
3841 | break; | 3841 | break; |
3842 | default: | 3842 | default: |
3843 | dev_info(&uvd->dev->dev, "IBM camera: using 320x240\n"); | 3843 | dev_info(&dev->dev, "IBM camera: using 320x240\n"); |
3844 | size = SIZE_320x240; | 3844 | size = SIZE_320x240; |
3845 | /* No break here */ | 3845 | /* No break here */ |
3846 | case SIZE_320x240: | 3846 | case SIZE_320x240: |
@@ -3869,7 +3869,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id * | |||
3869 | canvasY = 120; | 3869 | canvasY = 120; |
3870 | break; | 3870 | break; |
3871 | default: | 3871 | default: |
3872 | dev_info(&uvd->dev->dev, "IBM NetCamera: using 176x144\n"); | 3872 | dev_info(&dev->dev, "IBM NetCamera: using 176x144\n"); |
3873 | size = SIZE_176x144; | 3873 | size = SIZE_176x144; |
3874 | /* No break here */ | 3874 | /* No break here */ |
3875 | case SIZE_176x144: | 3875 | case SIZE_176x144: |