summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pwc/pwc-if.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-06-17 22:39:23 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-17 22:39:23 -0300
commitfb2e83ece3c03b94ad9e9ca75d658729b684a789 (patch)
tree6c1d6b7124e5dd844b02007e66471e7e9238f707 /linux/drivers/media/video/pwc/pwc-if.c
parent5e90c221e48890f2f2433f153d9584bc4bdd327a (diff)
parent1596f74981cbcf720947b4fd600028d24edfa783 (diff)
downloadmediapointer-dvb-s2-fb2e83ece3c03b94ad9e9ca75d658729b684a789.tar.gz
mediapointer-dvb-s2-fb2e83ece3c03b94ad9e9ca75d658729b684a789.tar.bz2
merge: http://linuxtv.org/hg/~hgoede/libv4l
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/pwc/pwc-if.c')
-rw-r--r--linux/drivers/media/video/pwc/pwc-if.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c
index 49a918636..4087612ee 100644
--- a/linux/drivers/media/video/pwc/pwc-if.c
+++ b/linux/drivers/media/video/pwc/pwc-if.c
@@ -605,7 +605,7 @@ static void pwc_snapshot_button(struct pwc_device *pdev, int down)
#ifdef CONFIG_USB_PWC_INPUT_EVDEV
if (pdev->button_dev) {
- input_report_key(pdev->button_dev, BTN_0, down);
+ input_report_key(pdev->button_dev, KEY_CAMERA, down);
input_sync(pdev->button_dev);
}
#endif
@@ -1133,6 +1133,7 @@ static int pwc_video_open(struct file *file)
}
mutex_lock(&pdev->modlock);
+ pwc_construct(pdev); /* set min/max sizes correct */
if (!pdev->usb_init) {
PWC_DEBUG_OPEN("Doing first time initialization.\n");
pdev->usb_init = 1;
@@ -1157,7 +1158,6 @@ static int pwc_video_open(struct file *file)
if (pwc_set_leds(pdev, led_on, led_off) < 0)
PWC_DEBUG_OPEN("Failed to set LED on/off time.\n");
- pwc_construct(pdev); /* set min/max sizes correct */
/* So far, so good. Allocate memory. */
i = pwc_allocate_buffers(pdev);
@@ -1791,7 +1791,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
return -ENOMEM;
}
memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template));
- pdev->vdev->parent = &(udev->dev);
+ pdev->vdev->parent = &intf->dev;
strcpy(pdev->vdev->name, name);
video_set_drvdata(pdev->vdev, pdev);
@@ -1859,7 +1859,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
pdev->button_dev->cdev.dev = &pdev->udev->dev;
#endif
pdev->button_dev->evbit[0] = BIT_MASK(EV_KEY);
- pdev->button_dev->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);
+ pdev->button_dev->keybit[BIT_WORD(KEY_CAMERA)] = BIT_MASK(KEY_CAMERA);
rc = input_register_device(pdev->button_dev);
if (rc) {