diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-02-19 04:28:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 15:11:09 -0300 |
commit | ac82f59f9cc6aae3300430fcc3422e59f83d89ae (patch) | |
tree | f1d16866c32178d7a54b76bbf9c733a946876d27 /drivers/media/video | |
parent | 5fb2dde28122e74bbab9dae3cc04bcbc8c08b332 (diff) | |
download | op-kernel-dev-ac82f59f9cc6aae3300430fcc3422e59f83d89ae.zip op-kernel-dev-ac82f59f9cc6aae3300430fcc3422e59f83d89ae.tar.gz |
V4L/DVB: gspca_main: Allow use of input device creation code for non int. inputs
Allow use of the gspca core input device creation code by subdrivers which
have non interrupt driven camera buttons.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/gspca.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 2c662ed..d9a934b 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -158,7 +158,7 @@ static int gspca_input_connect(struct gspca_dev *dev) int err = 0; dev->input_dev = NULL; - if (dev->sd_desc->int_pkt_scan) { + if (dev->sd_desc->int_pkt_scan || dev->sd_desc->other_input) { input_dev = input_allocate_device(); if (!input_dev) return -ENOMEM; diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index 0ed254b..02c696a 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h @@ -131,6 +131,9 @@ struct sd_desc { cam_ident_op get_chip_ident; #ifdef CONFIG_INPUT cam_int_pkt_op int_pkt_scan; + /* other_input makes the gspca core create gspca_dev->input even when + int_pkt_scan is NULL, for cams with non interrupt driven buttons */ + u8 other_input; #endif }; |