Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131922
b: refs/heads/master
c: 74ca11c
h: refs/heads/master
v: v3
  • Loading branch information
Bastien Nocera authored and Dmitry Torokhov committed Jan 11, 2009
1 parent e246255 commit 5b6aaf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c0340b774916caa4149892504169d290c8a720a
refs/heads/master: 74ca11c2056d01d9ebb3615cd781a148450c3c82
10 changes: 6 additions & 4 deletions trunk/drivers/media/video/uvc/uvc_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ static int uvc_input_init(struct uvc_device *dev)
usb_to_input_id(udev, &input->id);
input->dev.parent = &dev->intf->dev;

set_bit(EV_KEY, input->evbit);
set_bit(BTN_0, input->keybit);
__set_bit(EV_KEY, input->evbit);
__set_bit(KEY_CAMERA, input->keybit);

if ((ret = input_register_device(input)) < 0)
goto error;
Expand All @@ -71,8 +71,10 @@ static void uvc_input_cleanup(struct uvc_device *dev)
static void uvc_input_report_key(struct uvc_device *dev, unsigned int code,
int value)
{
if (dev->input)
if (dev->input) {
input_report_key(dev->input, code, value);
input_sync(dev->input);
}
}

#else
Expand All @@ -97,7 +99,7 @@ static void uvc_event_streaming(struct uvc_device *dev, __u8 *data, int len)
return;
uvc_trace(UVC_TRACE_STATUS, "Button (intf %u) %s len %d\n",
data[1], data[3] ? "pressed" : "released", len);
uvc_input_report_key(dev, BTN_0, data[3]);
uvc_input_report_key(dev, KEY_CAMERA, data[3]);
} else {
uvc_trace(UVC_TRACE_STATUS, "Stream %u error event %02x %02x "
"len %d.\n", data[1], data[2], data[3], len);
Expand Down

0 comments on commit 5b6aaf0

Please sign in to comment.