summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c60
1 files changed, 29 insertions, 31 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index 261c86639..153fb3c5b 100644
--- a/linux/drivers/media/video/saa7134/saa7134-input.c
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c
@@ -741,8 +741,6 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
- struct i2c_board_info info;
- struct IR_i2c_init_data init_data;
const unsigned short addr_list[] = {
0x7a, 0x47, 0x71, 0x2d,
I2C_CLIENT_END
@@ -769,9 +767,9 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
- memset(&info, 0, sizeof(struct i2c_board_info));
- memset(&init_data, 0, sizeof(struct IR_i2c_init_data));
- strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
+ memset(&dev->info, 0, sizeof(dev->info));
+ memset(&dev->init_data, 0, sizeof(dev->init_data));
+ strlcpy(dev->info.type, "ir_video", I2C_NAME_SIZE);
#endif
switch (dev->board) {
@@ -780,25 +778,25 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
snprintf(ir->c.name, sizeof(ir->c.name), "Pinnacle PCTV");
#else
- init_data.name = "Pinnacle PCTV";
+ dev->init_data.name = "Pinnacle PCTV";
#endif
if (pinnacle_remote == 0) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
ir->get_key = get_key_pinnacle_color;
ir->ir_codes = &ir_codes_pinnacle_color_table;
#else
- init_data.get_key = get_key_pinnacle_color;
- init_data.ir_codes = &ir_codes_pinnacle_color_table;
- info.addr = 0x47;
+ dev->init_data.get_key = get_key_pinnacle_color;
+ dev->init_data.ir_codes = &ir_codes_pinnacle_color_table;
+ dev->info.addr = 0x47;
#endif
} else {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
ir->get_key = get_key_pinnacle_grey;
ir->ir_codes = &ir_codes_pinnacle_grey_table;
#else
- init_data.get_key = get_key_pinnacle_grey;
- init_data.ir_codes = &ir_codes_pinnacle_grey_table;
- info.addr = 0x47;
+ dev->init_data.get_key = get_key_pinnacle_grey;
+ dev->init_data.ir_codes = &ir_codes_pinnacle_grey_table;
+ dev->info.addr = 0x47;
#endif
}
break;
@@ -808,9 +806,9 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
ir->get_key = get_key_purpletv;
ir->ir_codes = &ir_codes_purpletv_table;
#else
- init_data.name = "Purple TV";
- init_data.get_key = get_key_purpletv;
- init_data.ir_codes = &ir_codes_purpletv_table;
+ dev->init_data.name = "Purple TV";
+ dev->init_data.get_key = get_key_purpletv;
+ dev->init_data.ir_codes = &ir_codes_purpletv_table;
#endif
break;
case SAA7134_BOARD_MSI_TVATANYWHERE_PLUS:
@@ -819,10 +817,10 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
ir->get_key = get_key_msi_tvanywhere_plus;
ir->ir_codes = &ir_codes_msi_tvanywhere_plus_table;
#else
- init_data.name = "MSI TV@nywhere Plus";
- init_data.get_key = get_key_msi_tvanywhere_plus;
- init_data.ir_codes = &ir_codes_msi_tvanywhere_plus_table;
- info.addr = 0x30;
+ dev->init_data.name = "MSI TV@nywhere Plus";
+ dev->init_data.get_key = get_key_msi_tvanywhere_plus;
+ dev->init_data.ir_codes = &ir_codes_msi_tvanywhere_plus_table;
+ dev->info.addr = 0x30;
/* MSI TV@nywhere Plus controller doesn't seem to
respond to probes unless we read something from
an existing device. Weird...
@@ -839,9 +837,9 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
ir->get_key = get_key_hvr1110;
ir->ir_codes = &ir_codes_hauppauge_new_table;
#else
- init_data.name = "HVR 1110";
- init_data.get_key = get_key_hvr1110;
- init_data.ir_codes = &ir_codes_hauppauge_new_table;
+ dev->init_data.name = "HVR 1110";
+ dev->init_data.get_key = get_key_hvr1110;
+ dev->init_data.ir_codes = &ir_codes_hauppauge_new_table;
#endif
break;
case SAA7134_BOARD_BEHOLD_607FM_MK3:
@@ -862,9 +860,9 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
ir->get_key = get_key_beholdm6xx;
ir->ir_codes = &ir_codes_behold_table;
#else
- init_data.name = "BeholdTV";
- init_data.get_key = get_key_beholdm6xx;
- init_data.ir_codes = &ir_codes_behold_table;
+ dev->init_data.name = "BeholdTV";
+ dev->init_data.get_key = get_key_beholdm6xx;
+ dev->init_data.ir_codes = &ir_codes_behold_table;
#endif
break;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
@@ -873,22 +871,22 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
#else
case SAA7134_BOARD_AVERMEDIA_CARDBUS_501:
case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
- info.addr = 0x40;
+ dev->info.addr = 0x40;
#endif
break;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
- if (init_data.name)
- info.platform_data = &init_data;
+ if (dev->init_data.name)
+ dev->info.platform_data = &dev->init_data;
/* No need to probe if address is known */
- if (info.addr) {
- i2c_new_device(&dev->i2c_adap, &info);
+ if (dev->info.addr) {
+ i2c_new_device(&dev->i2c_adap, &dev->info);
return;
}
/* Address not known, fallback to probing */
- i2c_new_probed_device(&dev->i2c_adap, &info, addr_list);
+ i2c_new_probed_device(&dev->i2c_adap, &dev->info, addr_list);
#endif
}