[PATCH/RFC] remote control type initialization in saa7134-input.c

From: Alex Volkov
Date: Sun Nov 25 2012 - 11:32:20 EST


Function saa7134_probe_i2c_ir(..) in saa7134-input.c does not set any RC type
for Pinnacle PCTV 110i (and perhaps other) remote controls. For some other RCs
the setting (assinging some value to "type" member of the device structure)
is done either in this function or elsewhere (AFAIR), but not for PCTV.

This renders PCTV's remote control unavailable as input device in all kernels
since 2.6.37 to the 3.2.32 at least (which I tested), and I believe this
remains this way in current 3.6.x too.

The patch attached here (made against 3.2.32) puts RC's type initialization
(to RC_TYPE_OTHER) before board type testing "switch". (Perhaps, putting it
to 110i's "case" would be more correct, but it seem to work anyway.)

Signed-off-by: Alex Volkov <alex@xxxxxxxxxxxxxxxxx>

---
--- a/drivers/media/video/saa7134/saa7134-input.c 2012-10-17 08:50:15.000000000 +0600
+++ b/drivers/media/video/saa7134/saa7134-input.c 2012-11-25 21:49:42.000000000 +0600
@@ -858,6 +858,7 @@ void saa7134_probe_i2c_ir(struct saa7134
memset(&info, 0, sizeof(struct i2c_board_info));
memset(&dev->init_data, 0, sizeof(dev->init_data));
strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
+ dev->init_data.type = RC_TYPE_OTHER;

switch (dev->board) {
case SAA7134_BOARD_PINNACLE_PCTV_110i:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/