From: akpm@linux-foundation.org
To: dtor@mail.ru
Cc: linux-input@vger.kernel.org, akpm@linux-foundation.org,
hadess@hadess.net
Subject: [patch 12/17] input: uvc: the button on the camera is KEY_CAMERA
Date: Fri, 09 Jan 2009 12:19:50 -0800 [thread overview]
Message-ID: <200901092019.n09KJoV2017259@imap1.linux-foundation.org> (raw)
From: Bastien Nocera <hadess@hadess.net>
Not BTN_0. Also call input_sync() on the device once the button has been
pressed.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/media/video/uvc/uvc_status.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff -puN drivers/media/video/uvc/uvc_status.c~input-uvc-the-button-on-the-camera-is-key_camera drivers/media/video/uvc/uvc_status.c
--- a/drivers/media/video/uvc/uvc_status.c~input-uvc-the-button-on-the-camera-is-key_camera
+++ a/drivers/media/video/uvc/uvc_status.c
@@ -47,7 +47,7 @@ static int uvc_input_init(struct uvc_dev
input->dev.parent = &dev->intf->dev;
set_bit(EV_KEY, input->evbit);
- set_bit(BTN_0, input->keybit);
+ set_bit(KEY_CAMERA, input->keybit);
if ((ret = input_register_device(input)) < 0)
goto error;
@@ -70,8 +70,10 @@ static void uvc_input_cleanup(struct uvc
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
@@ -96,7 +98,7 @@ static void uvc_event_streaming(struct u
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);
_
next reply other threads:[~2009-01-09 20:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-09 20:19 akpm [this message]
2009-01-11 7:49 ` [patch 12/17] input: uvc: the button on the camera is KEY_CAMERA Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200901092019.n09KJoV2017259@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dtor@mail.ru \
--cc=hadess@hadess.net \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).