Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181748
b: refs/heads/master
c: f65e93d
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 156fcfe commit 9c81bc5
Show file tree
Hide file tree
Showing 2 changed files with 24 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: 1a3510265b45e2d7f55879c7ff576b947e0b1bd7
refs/heads/master: f65e93d60050ae4cf281b55b59864e7e7a08eb58
23 changes: 23 additions & 0 deletions trunk/drivers/media/video/gspca/sonixb.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Reg Use

#define MODULE_NAME "sonixb"

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

MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
Expand Down Expand Up @@ -1220,6 +1221,25 @@ static int sd_querymenu(struct gspca_dev *gspca_dev,
return -EINVAL;
}

#ifdef CONFIG_INPUT
static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
u8 *data, /* interrupt packet data */
int len) /* interrupt packet length */
{
int ret = -EINVAL;

if (len == 1 && data[0] == 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);
ret = 0;
}

return ret;
}
#endif

/* sub-driver description */
static const struct sd_desc sd_desc = {
.name = MODULE_NAME,
Expand All @@ -1232,6 +1252,9 @@ static const struct sd_desc sd_desc = {
.pkt_scan = sd_pkt_scan,
.querymenu = sd_querymenu,
.dq_callback = do_autogain,
#ifdef CONFIG_INPUT
.int_pkt_scan = sd_int_pkt_scan,
#endif
};

/* -- module initialisation -- */
Expand Down

0 comments on commit 9c81bc5

Please sign in to comment.