Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2856643e authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB: gspca - many subdrivers: Handle the buttons when CONFIG_INPUT=m

parent 85c55efb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
	struct sd *sd = (struct sd *) gspca_dev;

	konica_stream_off(gspca_dev);
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
	/* Don't keep the button in the pressed state "forever" if it was
	   pressed when streaming is stopped */
	if (sd->snapshot_pressed) {
@@ -451,7 +451,7 @@ static void sd_isoc_irq(struct urb *urb)
			gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0);
			gspca_frame_add(gspca_dev, FIRST_PACKET, NULL, 0);
		} else {
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
			u8 button_state = st & 0x40 ? 1 : 0;
			if (sd->snapshot_pressed != button_state) {
				input_report_key(gspca_dev->input_dev,
@@ -601,7 +601,7 @@ static const struct sd_desc sd_desc = {
	.init = sd_init,
	.start = sd_start,
	.stopN = sd_stopN,
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
	.other_input = 1,
#endif
};
+2 −2
Original line number Diff line number Diff line
@@ -3997,7 +3997,7 @@ static void ov51x_handle_button(struct gspca_dev *gspca_dev, u8 state)
	struct sd *sd = (struct sd *) gspca_dev;

	if (sd->snapshot_pressed != state) {
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
		input_report_key(gspca_dev->input_dev, KEY_CAMERA, state);
		input_sync(gspca_dev->input_dev);
#endif
@@ -4598,7 +4598,7 @@ static const struct sd_desc sd_desc = {
	.querymenu = sd_querymenu,
	.get_jcomp = sd_get_jcomp,
	.set_jcomp = sd_set_jcomp,
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
	.other_input = 1,
#endif
};
+2 −2
Original line number Diff line number Diff line
@@ -494,7 +494,7 @@ static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val)
	return 0;
}

#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
			u8 *data,		/* interrupt packet data */
			int len)		/* interrput packet length */
@@ -524,7 +524,7 @@ static const struct sd_desc sd_desc = {
	.stopN = sd_stopN,
	.dq_callback = pac207_do_auto_gain,
	.pkt_scan = sd_pkt_scan,
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
	.int_pkt_scan = sd_int_pkt_scan,
#endif
};
+2 −2
Original line number Diff line number Diff line
@@ -1132,7 +1132,7 @@ static int sd_chip_ident(struct gspca_dev *gspca_dev,
}
#endif

#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
			u8 *data,		/* interrupt packet data */
			int len)		/* interrput packet length */
@@ -1179,7 +1179,7 @@ static const struct sd_desc sd_desc = {
	.set_register = sd_dbg_s_register,
	.get_chip_ident = sd_chip_ident,
#endif
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
	.int_pkt_scan = sd_int_pkt_scan,
#endif
};
+2 −2
Original line number Diff line number Diff line
@@ -789,7 +789,7 @@ static int sd_getvflip(struct gspca_dev *gspca_dev, __s32 *val)
	return 0;
}

#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
			u8 *data,		/* interrupt packet data */
			int len)		/* interrupt packet length */
@@ -832,7 +832,7 @@ static const struct sd_desc sd_desc = {
	.stop0 = sd_stop0,
	.pkt_scan = sd_pkt_scan,
	.dq_callback = do_autogain,
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
	.int_pkt_scan = sd_int_pkt_scan,
#endif
};
Loading