diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-10-01 06:33:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:06:20 -0400 |
commit | 2856643e2e18f306227ae1257b63fc713d426dc7 (patch) | |
tree | 95d66ed5853da693ec44729f592ee3e2f3dea80a /drivers/media/video/gspca | |
parent | 85c55efb0a20c5dac435a6817ffb20fe988b9122 (diff) |
V4L/DVB: gspca - many subdrivers: Handle the buttons when CONFIG_INPUT=m
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r-- | drivers/media/video/gspca/konica.c | 6 | ||||
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/pac207.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/pac7302.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/pac7311.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/sn9c20x.c | 6 | ||||
-rw-r--r-- | drivers/media/video/gspca/sonixb.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/sonixj.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca561.c | 6 | ||||
-rw-r--r-- | drivers/media/video/gspca/stv06xx/stv06xx.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 6 |
11 files changed, 24 insertions, 28 deletions
diff --git a/drivers/media/video/gspca/konica.c b/drivers/media/video/gspca/konica.c index 31ea306abccf..f3fe33c23824 100644 --- a/drivers/media/video/gspca/konica.c +++ b/drivers/media/video/gspca/konica.c | |||
@@ -352,7 +352,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) | |||
352 | struct sd *sd = (struct sd *) gspca_dev; | 352 | struct sd *sd = (struct sd *) gspca_dev; |
353 | 353 | ||
354 | konica_stream_off(gspca_dev); | 354 | konica_stream_off(gspca_dev); |
355 | #ifdef CONFIG_INPUT | 355 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
356 | /* Don't keep the button in the pressed state "forever" if it was | 356 | /* Don't keep the button in the pressed state "forever" if it was |
357 | pressed when streaming is stopped */ | 357 | pressed when streaming is stopped */ |
358 | if (sd->snapshot_pressed) { | 358 | if (sd->snapshot_pressed) { |
@@ -451,7 +451,7 @@ static void sd_isoc_irq(struct urb *urb) | |||
451 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); | 451 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); |
452 | gspca_frame_add(gspca_dev, FIRST_PACKET, NULL, 0); | 452 | gspca_frame_add(gspca_dev, FIRST_PACKET, NULL, 0); |
453 | } else { | 453 | } else { |
454 | #ifdef CONFIG_INPUT | 454 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
455 | u8 button_state = st & 0x40 ? 1 : 0; | 455 | u8 button_state = st & 0x40 ? 1 : 0; |
456 | if (sd->snapshot_pressed != button_state) { | 456 | if (sd->snapshot_pressed != button_state) { |
457 | input_report_key(gspca_dev->input_dev, | 457 | input_report_key(gspca_dev->input_dev, |
@@ -601,7 +601,7 @@ static const struct sd_desc sd_desc = { | |||
601 | .init = sd_init, | 601 | .init = sd_init, |
602 | .start = sd_start, | 602 | .start = sd_start, |
603 | .stopN = sd_stopN, | 603 | .stopN = sd_stopN, |
604 | #ifdef CONFIG_INPUT | 604 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
605 | .other_input = 1, | 605 | .other_input = 1, |
606 | #endif | 606 | #endif |
607 | }; | 607 | }; |
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 307bc8b7b80c..17b0d51d91e5 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -3997,7 +3997,7 @@ static void ov51x_handle_button(struct gspca_dev *gspca_dev, u8 state) | |||
3997 | struct sd *sd = (struct sd *) gspca_dev; | 3997 | struct sd *sd = (struct sd *) gspca_dev; |
3998 | 3998 | ||
3999 | if (sd->snapshot_pressed != state) { | 3999 | if (sd->snapshot_pressed != state) { |
4000 | #ifdef CONFIG_INPUT | 4000 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
4001 | input_report_key(gspca_dev->input_dev, KEY_CAMERA, state); | 4001 | input_report_key(gspca_dev->input_dev, KEY_CAMERA, state); |
4002 | input_sync(gspca_dev->input_dev); | 4002 | input_sync(gspca_dev->input_dev); |
4003 | #endif | 4003 | #endif |
@@ -4598,7 +4598,7 @@ static const struct sd_desc sd_desc = { | |||
4598 | .querymenu = sd_querymenu, | 4598 | .querymenu = sd_querymenu, |
4599 | .get_jcomp = sd_get_jcomp, | 4599 | .get_jcomp = sd_get_jcomp, |
4600 | .set_jcomp = sd_set_jcomp, | 4600 | .set_jcomp = sd_set_jcomp, |
4601 | #ifdef CONFIG_INPUT | 4601 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
4602 | .other_input = 1, | 4602 | .other_input = 1, |
4603 | #endif | 4603 | #endif |
4604 | }; | 4604 | }; |
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index c8da04bd115c..892b4549c6f8 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c | |||
@@ -494,7 +494,7 @@ static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val) | |||
494 | return 0; | 494 | return 0; |
495 | } | 495 | } |
496 | 496 | ||
497 | #ifdef CONFIG_INPUT | 497 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
498 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, | 498 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
499 | u8 *data, /* interrupt packet data */ | 499 | u8 *data, /* interrupt packet data */ |
500 | int len) /* interrput packet length */ | 500 | int len) /* interrput packet length */ |
@@ -524,7 +524,7 @@ static const struct sd_desc sd_desc = { | |||
524 | .stopN = sd_stopN, | 524 | .stopN = sd_stopN, |
525 | .dq_callback = pac207_do_auto_gain, | 525 | .dq_callback = pac207_do_auto_gain, |
526 | .pkt_scan = sd_pkt_scan, | 526 | .pkt_scan = sd_pkt_scan, |
527 | #ifdef CONFIG_INPUT | 527 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
528 | .int_pkt_scan = sd_int_pkt_scan, | 528 | .int_pkt_scan = sd_int_pkt_scan, |
529 | #endif | 529 | #endif |
530 | }; | 530 | }; |
diff --git a/drivers/media/video/gspca/pac7302.c b/drivers/media/video/gspca/pac7302.c index f41c4edc5fe5..ac37737bf13b 100644 --- a/drivers/media/video/gspca/pac7302.c +++ b/drivers/media/video/gspca/pac7302.c | |||
@@ -1132,7 +1132,7 @@ static int sd_chip_ident(struct gspca_dev *gspca_dev, | |||
1132 | } | 1132 | } |
1133 | #endif | 1133 | #endif |
1134 | 1134 | ||
1135 | #ifdef CONFIG_INPUT | 1135 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
1136 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, | 1136 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
1137 | u8 *data, /* interrupt packet data */ | 1137 | u8 *data, /* interrupt packet data */ |
1138 | int len) /* interrput packet length */ | 1138 | int len) /* interrput packet length */ |
@@ -1179,7 +1179,7 @@ static const struct sd_desc sd_desc = { | |||
1179 | .set_register = sd_dbg_s_register, | 1179 | .set_register = sd_dbg_s_register, |
1180 | .get_chip_ident = sd_chip_ident, | 1180 | .get_chip_ident = sd_chip_ident, |
1181 | #endif | 1181 | #endif |
1182 | #ifdef CONFIG_INPUT | 1182 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
1183 | .int_pkt_scan = sd_int_pkt_scan, | 1183 | .int_pkt_scan = sd_int_pkt_scan, |
1184 | #endif | 1184 | #endif |
1185 | }; | 1185 | }; |
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index 041dffcb5767..7cb5b40c29a6 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -789,7 +789,7 @@ static int sd_getvflip(struct gspca_dev *gspca_dev, __s32 *val) | |||
789 | return 0; | 789 | return 0; |
790 | } | 790 | } |
791 | 791 | ||
792 | #ifdef CONFIG_INPUT | 792 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
793 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, | 793 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
794 | u8 *data, /* interrupt packet data */ | 794 | u8 *data, /* interrupt packet data */ |
795 | int len) /* interrupt packet length */ | 795 | int len) /* interrupt packet length */ |
@@ -832,7 +832,7 @@ static const struct sd_desc sd_desc = { | |||
832 | .stop0 = sd_stop0, | 832 | .stop0 = sd_stop0, |
833 | .pkt_scan = sd_pkt_scan, | 833 | .pkt_scan = sd_pkt_scan, |
834 | .dq_callback = do_autogain, | 834 | .dq_callback = do_autogain, |
835 | #ifdef CONFIG_INPUT | 835 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
836 | .int_pkt_scan = sd_int_pkt_scan, | 836 | .int_pkt_scan = sd_int_pkt_scan, |
837 | #endif | 837 | #endif |
838 | }; | 838 | }; |
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index 53ed0f7e0219..57673891c2c2 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c | |||
@@ -18,9 +18,7 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifdef CONFIG_INPUT | ||
22 | #include <linux/input.h> | 21 | #include <linux/input.h> |
23 | #endif | ||
24 | 22 | ||
25 | #include "gspca.h" | 23 | #include "gspca.h" |
26 | #include "jpeg.h" | 24 | #include "jpeg.h" |
@@ -2304,7 +2302,7 @@ static void sd_dqcallback(struct gspca_dev *gspca_dev) | |||
2304 | do_autoexposure(gspca_dev, avg_lum); | 2302 | do_autoexposure(gspca_dev, avg_lum); |
2305 | } | 2303 | } |
2306 | 2304 | ||
2307 | #ifdef CONFIG_INPUT | 2305 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
2308 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, | 2306 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
2309 | u8 *data, /* interrupt packet */ | 2307 | u8 *data, /* interrupt packet */ |
2310 | int len) /* interrupt packet length */ | 2308 | int len) /* interrupt packet length */ |
@@ -2386,7 +2384,7 @@ static const struct sd_desc sd_desc = { | |||
2386 | .start = sd_start, | 2384 | .start = sd_start, |
2387 | .stopN = sd_stopN, | 2385 | .stopN = sd_stopN, |
2388 | .pkt_scan = sd_pkt_scan, | 2386 | .pkt_scan = sd_pkt_scan, |
2389 | #ifdef CONFIG_INPUT | 2387 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
2390 | .int_pkt_scan = sd_int_pkt_scan, | 2388 | .int_pkt_scan = sd_int_pkt_scan, |
2391 | #endif | 2389 | #endif |
2392 | .dq_callback = sd_dqcallback, | 2390 | .dq_callback = sd_dqcallback, |
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c index 906b6b3ecf27..814ea1e8a28e 100644 --- a/drivers/media/video/gspca/sonixb.c +++ b/drivers/media/video/gspca/sonixb.c | |||
@@ -1388,7 +1388,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev, | |||
1388 | return -EINVAL; | 1388 | return -EINVAL; |
1389 | } | 1389 | } |
1390 | 1390 | ||
1391 | #ifdef CONFIG_INPUT | 1391 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
1392 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, | 1392 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
1393 | u8 *data, /* interrupt packet data */ | 1393 | u8 *data, /* interrupt packet data */ |
1394 | int len) /* interrupt packet length */ | 1394 | int len) /* interrupt packet length */ |
@@ -1419,7 +1419,7 @@ static const struct sd_desc sd_desc = { | |||
1419 | .pkt_scan = sd_pkt_scan, | 1419 | .pkt_scan = sd_pkt_scan, |
1420 | .querymenu = sd_querymenu, | 1420 | .querymenu = sd_querymenu, |
1421 | .dq_callback = do_autogain, | 1421 | .dq_callback = do_autogain, |
1422 | #ifdef CONFIG_INPUT | 1422 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
1423 | .int_pkt_scan = sd_int_pkt_scan, | 1423 | .int_pkt_scan = sd_int_pkt_scan, |
1424 | #endif | 1424 | #endif |
1425 | }; | 1425 | }; |
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 583c3410a2c2..6e04ac79f401 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -2993,7 +2993,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev, | |||
2993 | return -EINVAL; | 2993 | return -EINVAL; |
2994 | } | 2994 | } |
2995 | 2995 | ||
2996 | #ifdef CONFIG_INPUT | 2996 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
2997 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, | 2997 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
2998 | u8 *data, /* interrupt packet data */ | 2998 | u8 *data, /* interrupt packet data */ |
2999 | int len) /* interrupt packet length */ | 2999 | int len) /* interrupt packet length */ |
@@ -3026,7 +3026,7 @@ static const struct sd_desc sd_desc = { | |||
3026 | .get_jcomp = sd_get_jcomp, | 3026 | .get_jcomp = sd_get_jcomp, |
3027 | .set_jcomp = sd_set_jcomp, | 3027 | .set_jcomp = sd_set_jcomp, |
3028 | .querymenu = sd_querymenu, | 3028 | .querymenu = sd_querymenu, |
3029 | #ifdef CONFIG_INPUT | 3029 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
3030 | .int_pkt_scan = sd_int_pkt_scan, | 3030 | .int_pkt_scan = sd_int_pkt_scan, |
3031 | #endif | 3031 | #endif |
3032 | }; | 3032 | }; |
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index c530f50307ad..ad73f4812c05 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c | |||
@@ -787,7 +787,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
787 | return; | 787 | return; |
788 | } | 788 | } |
789 | 789 | ||
790 | #ifdef CONFIG_INPUT | 790 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
791 | if (data[0] & 0x20) { | 791 | if (data[0] & 0x20) { |
792 | input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1); | 792 | input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1); |
793 | input_sync(gspca_dev->input_dev); | 793 | input_sync(gspca_dev->input_dev); |
@@ -1037,7 +1037,7 @@ static const struct sd_desc sd_desc_12a = { | |||
1037 | .start = sd_start_12a, | 1037 | .start = sd_start_12a, |
1038 | .stopN = sd_stopN, | 1038 | .stopN = sd_stopN, |
1039 | .pkt_scan = sd_pkt_scan, | 1039 | .pkt_scan = sd_pkt_scan, |
1040 | #ifdef CONFIG_INPUT | 1040 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
1041 | .other_input = 1, | 1041 | .other_input = 1, |
1042 | #endif | 1042 | #endif |
1043 | }; | 1043 | }; |
@@ -1051,7 +1051,7 @@ static const struct sd_desc sd_desc_72a = { | |||
1051 | .stopN = sd_stopN, | 1051 | .stopN = sd_stopN, |
1052 | .pkt_scan = sd_pkt_scan, | 1052 | .pkt_scan = sd_pkt_scan, |
1053 | .dq_callback = do_autogain, | 1053 | .dq_callback = do_autogain, |
1054 | #ifdef CONFIG_INPUT | 1054 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
1055 | .other_input = 1, | 1055 | .other_input = 1, |
1056 | #endif | 1056 | #endif |
1057 | }; | 1057 | }; |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index b818ab80304c..086de44a6e57 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -428,7 +428,7 @@ frame_data: | |||
428 | } | 428 | } |
429 | } | 429 | } |
430 | 430 | ||
431 | #ifdef CONFIG_INPUT | 431 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
432 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, | 432 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
433 | u8 *data, /* interrupt packet data */ | 433 | u8 *data, /* interrupt packet data */ |
434 | int len) /* interrupt packet length */ | 434 | int len) /* interrupt packet length */ |
@@ -462,7 +462,7 @@ static const struct sd_desc sd_desc = { | |||
462 | .start = stv06xx_start, | 462 | .start = stv06xx_start, |
463 | .stopN = stv06xx_stopN, | 463 | .stopN = stv06xx_stopN, |
464 | .pkt_scan = stv06xx_pkt_scan, | 464 | .pkt_scan = stv06xx_pkt_scan, |
465 | #ifdef CONFIG_INPUT | 465 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
466 | .int_pkt_scan = sd_int_pkt_scan, | 466 | .int_pkt_scan = sd_int_pkt_scan, |
467 | #endif | 467 | #endif |
468 | }; | 468 | }; |
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index e2f1a0e1e2c2..c9c2b89c5bf9 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -21,9 +21,7 @@ | |||
21 | 21 | ||
22 | #define MODULE_NAME "zc3xx" | 22 | #define MODULE_NAME "zc3xx" |
23 | 23 | ||
24 | #ifdef CONFIG_INPUT | ||
25 | #include <linux/input.h> | 24 | #include <linux/input.h> |
26 | #endif | ||
27 | #include "gspca.h" | 25 | #include "gspca.h" |
28 | #include "jpeg.h" | 26 | #include "jpeg.h" |
29 | 27 | ||
@@ -7006,7 +7004,7 @@ static int sd_get_jcomp(struct gspca_dev *gspca_dev, | |||
7006 | return 0; | 7004 | return 0; |
7007 | } | 7005 | } |
7008 | 7006 | ||
7009 | #ifdef CONFIG_INPUT | 7007 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
7010 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, | 7008 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
7011 | u8 *data, /* interrupt packet data */ | 7009 | u8 *data, /* interrupt packet data */ |
7012 | int len) /* interrput packet length */ | 7010 | int len) /* interrput packet length */ |
@@ -7034,7 +7032,7 @@ static const struct sd_desc sd_desc = { | |||
7034 | .querymenu = sd_querymenu, | 7032 | .querymenu = sd_querymenu, |
7035 | .get_jcomp = sd_get_jcomp, | 7033 | .get_jcomp = sd_get_jcomp, |
7036 | .set_jcomp = sd_set_jcomp, | 7034 | .set_jcomp = sd_set_jcomp, |
7037 | #ifdef CONFIG_INPUT | 7035 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
7038 | .int_pkt_scan = sd_int_pkt_scan, | 7036 | .int_pkt_scan = sd_int_pkt_scan, |
7039 | #endif | 7037 | #endif |
7040 | }; | 7038 | }; |