Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181747
b: refs/heads/master
c: 1a35102
h: refs/heads/master
i:
  181745: c48b7cb
  181743: eeb9605
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent b889ef9 commit 156fcfe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32ea3e44b9d9125960e23f56ce86c39700447717
refs/heads/master: 1a3510265b45e2d7f55879c7ff576b947e0b1bd7
20 changes: 20 additions & 0 deletions trunk/drivers/media/video/gspca/zc3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#define MODULE_NAME "zc3xx"

#include <linux/input.h>
#include "gspca.h"
#include "jpeg.h"

Expand Down Expand Up @@ -7170,6 +7171,22 @@ static int sd_get_jcomp(struct gspca_dev *gspca_dev,
return 0;
}

#ifdef CONFIG_INPUT
static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
u8 *data, /* interrupt packet data */
int len) /* interrput packet length */
{
if (len == 8 && data[4] == 1) {
input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1);
input_sync(gspca_dev->input_dev);
input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0);
input_sync(gspca_dev->input_dev);
}

return 0;
}
#endif

static const struct sd_desc sd_desc = {
.name = MODULE_NAME,
.ctrls = sd_ctrls,
Expand All @@ -7182,6 +7199,9 @@ static const struct sd_desc sd_desc = {
.querymenu = sd_querymenu,
.get_jcomp = sd_get_jcomp,
.set_jcomp = sd_set_jcomp,
#ifdef CONFIG_INPUT
.int_pkt_scan = sd_int_pkt_scan,
#endif
};

static const __devinitdata struct usb_device_id device_table[] = {
Expand Down

0 comments on commit 156fcfe

Please sign in to comment.