Commit ac82f59f authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 5fb2dde2
...@@ -158,7 +158,7 @@ static int gspca_input_connect(struct gspca_dev *dev) ...@@ -158,7 +158,7 @@ static int gspca_input_connect(struct gspca_dev *dev)
int err = 0; int err = 0;
dev->input_dev = NULL; 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(); input_dev = input_allocate_device();
if (!input_dev) if (!input_dev)
return -ENOMEM; return -ENOMEM;
......
...@@ -131,6 +131,9 @@ struct sd_desc { ...@@ -131,6 +131,9 @@ struct sd_desc {
cam_ident_op get_chip_ident; cam_ident_op get_chip_ident;
#ifdef CONFIG_INPUT #ifdef CONFIG_INPUT
cam_int_pkt_op int_pkt_scan; 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 #endif
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment