aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-01 20:27:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:56:45 -0400
commitd705d2ab7596b4661a2f13172f4f93ad11bd761f (patch)
treeb5c143a8a03bb056f1ce4f1a7431ca03dbdb97be /drivers
parent165344bd43b1410d10dc9dc8a376da31178d1694 (diff)
V4L/DVB: ir: use IR_KEYTABLE where an IR table is needed
Replaces most of the occurences of IR keytables on V4L drivers by a macro that evaluates to provide the name of the exported symbol. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dm1105/dm1105.c2
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c6
-rw-r--r--drivers/media/video/bt8xx/bttv-input.c24
-rw-r--r--drivers/media/video/cx18/cx18-i2c.c2
-rw-r--r--drivers/media/video/cx23885/cx23885-input.c2
-rw-r--r--drivers/media/video/cx88/cx88-input.c38
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c34
-rw-r--r--drivers/media/video/ir-kbd-i2c.c18
-rw-r--r--drivers/media/video/ivtv/ivtv-i2c.c6
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c68
10 files changed, 100 insertions, 100 deletions
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c
index 3229ff325c56..ff62dc8633c0 100644
--- a/drivers/media/dvb/dm1105/dm1105.c
+++ b/drivers/media/dvb/dm1105/dm1105.c
@@ -596,7 +596,7 @@ static irqreturn_t dm1105_irq(int irq, void *dev_id)
596int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) 596int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
597{ 597{
598 struct input_dev *input_dev; 598 struct input_dev *input_dev;
599 struct ir_scancode_table *ir_codes = &ir_codes_dm1105_nec_table; 599 struct ir_scancode_table *ir_codes = &IR_KEYTABLE(dm1105_nec);
600 u64 ir_type = IR_TYPE_OTHER; 600 u64 ir_type = IR_TYPE_OTHER;
601 int err = -ENOMEM; 601 int err = -ENOMEM;
602 602
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index ec89afd38917..75c640e5966c 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -232,7 +232,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
232 case 0x1011: 232 case 0x1011:
233 case 0x1012: 233 case 0x1012:
234 /* The hauppauge keymap is a superset of these remotes */ 234 /* The hauppauge keymap is a superset of these remotes */
235 ir_codes = &ir_codes_hauppauge_new_table; 235 ir_codes = &IR_KEYTABLE(hauppauge_new);
236 236
237 if (rc5_device < 0) 237 if (rc5_device < 0)
238 budget_ci->ir.rc5_device = 0x1f; 238 budget_ci->ir.rc5_device = 0x1f;
@@ -241,11 +241,11 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
241 case 0x1017: 241 case 0x1017:
242 case 0x101a: 242 case 0x101a:
243 /* for the Technotrend 1500 bundled remote */ 243 /* for the Technotrend 1500 bundled remote */
244 ir_codes = &ir_codes_tt_1500_table; 244 ir_codes = &IR_KEYTABLE(tt_1500);
245 break; 245 break;
246 default: 246 default:
247 /* unknown remote */ 247 /* unknown remote */
248 ir_codes = &ir_codes_budget_ci_old_table; 248 ir_codes = &IR_KEYTABLE(budget_ci_old);
249 break; 249 break;
250 } 250 }
251 251
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c
index d17a9b7911e5..e3d239da1bad 100644
--- a/drivers/media/video/bt8xx/bttv-input.c
+++ b/drivers/media/video/bt8xx/bttv-input.c
@@ -266,7 +266,7 @@ int bttv_input_init(struct bttv *btv)
266 case BTTV_BOARD_AVERMEDIA: 266 case BTTV_BOARD_AVERMEDIA:
267 case BTTV_BOARD_AVPHONE98: 267 case BTTV_BOARD_AVPHONE98:
268 case BTTV_BOARD_AVERMEDIA98: 268 case BTTV_BOARD_AVERMEDIA98:
269 ir_codes = &ir_codes_avermedia_table; 269 ir_codes = &IR_KEYTABLE(avermedia);
270 ir->mask_keycode = 0xf88000; 270 ir->mask_keycode = 0xf88000;
271 ir->mask_keydown = 0x010000; 271 ir->mask_keydown = 0x010000;
272 ir->polling = 50; // ms 272 ir->polling = 50; // ms
@@ -274,14 +274,14 @@ int bttv_input_init(struct bttv *btv)
274 274
275 case BTTV_BOARD_AVDVBT_761: 275 case BTTV_BOARD_AVDVBT_761:
276 case BTTV_BOARD_AVDVBT_771: 276 case BTTV_BOARD_AVDVBT_771:
277 ir_codes = &ir_codes_avermedia_dvbt_table; 277 ir_codes = &IR_KEYTABLE(avermedia_dvbt);
278 ir->mask_keycode = 0x0f00c0; 278 ir->mask_keycode = 0x0f00c0;
279 ir->mask_keydown = 0x000020; 279 ir->mask_keydown = 0x000020;
280 ir->polling = 50; // ms 280 ir->polling = 50; // ms
281 break; 281 break;
282 282
283 case BTTV_BOARD_PXELVWPLTVPAK: 283 case BTTV_BOARD_PXELVWPLTVPAK:
284 ir_codes = &ir_codes_pixelview_table; 284 ir_codes = &IR_KEYTABLE(pixelview);
285 ir->mask_keycode = 0x003e00; 285 ir->mask_keycode = 0x003e00;
286 ir->mask_keyup = 0x010000; 286 ir->mask_keyup = 0x010000;
287 ir->polling = 50; // ms 287 ir->polling = 50; // ms
@@ -289,24 +289,24 @@ int bttv_input_init(struct bttv *btv)
289 case BTTV_BOARD_PV_M4900: 289 case BTTV_BOARD_PV_M4900:
290 case BTTV_BOARD_PV_BT878P_9B: 290 case BTTV_BOARD_PV_BT878P_9B:
291 case BTTV_BOARD_PV_BT878P_PLUS: 291 case BTTV_BOARD_PV_BT878P_PLUS:
292 ir_codes = &ir_codes_pixelview_table; 292 ir_codes = &IR_KEYTABLE(pixelview);
293 ir->mask_keycode = 0x001f00; 293 ir->mask_keycode = 0x001f00;
294 ir->mask_keyup = 0x008000; 294 ir->mask_keyup = 0x008000;
295 ir->polling = 50; // ms 295 ir->polling = 50; // ms
296 break; 296 break;
297 297
298 case BTTV_BOARD_WINFAST2000: 298 case BTTV_BOARD_WINFAST2000:
299 ir_codes = &ir_codes_winfast_table; 299 ir_codes = &IR_KEYTABLE(winfast);
300 ir->mask_keycode = 0x1f8; 300 ir->mask_keycode = 0x1f8;
301 break; 301 break;
302 case BTTV_BOARD_MAGICTVIEW061: 302 case BTTV_BOARD_MAGICTVIEW061:
303 case BTTV_BOARD_MAGICTVIEW063: 303 case BTTV_BOARD_MAGICTVIEW063:
304 ir_codes = &ir_codes_winfast_table; 304 ir_codes = &IR_KEYTABLE(winfast);
305 ir->mask_keycode = 0x0008e000; 305 ir->mask_keycode = 0x0008e000;
306 ir->mask_keydown = 0x00200000; 306 ir->mask_keydown = 0x00200000;
307 break; 307 break;
308 case BTTV_BOARD_APAC_VIEWCOMP: 308 case BTTV_BOARD_APAC_VIEWCOMP:
309 ir_codes = &ir_codes_apac_viewcomp_table; 309 ir_codes = &IR_KEYTABLE(apac_viewcomp);
310 ir->mask_keycode = 0x001f00; 310 ir->mask_keycode = 0x001f00;
311 ir->mask_keyup = 0x008000; 311 ir->mask_keyup = 0x008000;
312 ir->polling = 50; // ms 312 ir->polling = 50; // ms
@@ -314,30 +314,30 @@ int bttv_input_init(struct bttv *btv)
314 case BTTV_BOARD_ASKEY_CPH03X: 314 case BTTV_BOARD_ASKEY_CPH03X:
315 case BTTV_BOARD_CONCEPTRONIC_CTVFMI2: 315 case BTTV_BOARD_CONCEPTRONIC_CTVFMI2:
316 case BTTV_BOARD_CONTVFMI: 316 case BTTV_BOARD_CONTVFMI:
317 ir_codes = &ir_codes_pixelview_table; 317 ir_codes = &IR_KEYTABLE(pixelview);
318 ir->mask_keycode = 0x001F00; 318 ir->mask_keycode = 0x001F00;
319 ir->mask_keyup = 0x006000; 319 ir->mask_keyup = 0x006000;
320 ir->polling = 50; // ms 320 ir->polling = 50; // ms
321 break; 321 break;
322 case BTTV_BOARD_NEBULA_DIGITV: 322 case BTTV_BOARD_NEBULA_DIGITV:
323 ir_codes = &ir_codes_nebula_table; 323 ir_codes = &IR_KEYTABLE(nebula);
324 btv->custom_irq = bttv_rc5_irq; 324 btv->custom_irq = bttv_rc5_irq;
325 ir->rc5_gpio = 1; 325 ir->rc5_gpio = 1;
326 break; 326 break;
327 case BTTV_BOARD_MACHTV_MAGICTV: 327 case BTTV_BOARD_MACHTV_MAGICTV:
328 ir_codes = &ir_codes_apac_viewcomp_table; 328 ir_codes = &IR_KEYTABLE(apac_viewcomp);
329 ir->mask_keycode = 0x001F00; 329 ir->mask_keycode = 0x001F00;
330 ir->mask_keyup = 0x004000; 330 ir->mask_keyup = 0x004000;
331 ir->polling = 50; /* ms */ 331 ir->polling = 50; /* ms */
332 break; 332 break;
333 case BTTV_BOARD_KOZUMI_KTV_01C: 333 case BTTV_BOARD_KOZUMI_KTV_01C:
334 ir_codes = &ir_codes_pctv_sedna_table; 334 ir_codes = &IR_KEYTABLE(pctv_sedna);
335 ir->mask_keycode = 0x001f00; 335 ir->mask_keycode = 0x001f00;
336 ir->mask_keyup = 0x006000; 336 ir->mask_keyup = 0x006000;
337 ir->polling = 50; /* ms */ 337 ir->polling = 50; /* ms */
338 break; 338 break;
339 case BTTV_BOARD_ENLTV_FM_2: 339 case BTTV_BOARD_ENLTV_FM_2:
340 ir_codes = &ir_codes_encore_enltv2_table; 340 ir_codes = &IR_KEYTABLE(encore_enltv2);
341 ir->mask_keycode = 0x00fd00; 341 ir->mask_keycode = 0x00fd00;
342 ir->mask_keyup = 0x000080; 342 ir->mask_keyup = 0x000080;
343 ir->polling = 1; /* ms */ 343 ir->polling = 1; /* ms */
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c
index eecf29af916c..476c016e63a8 100644
--- a/drivers/media/video/cx18/cx18-i2c.c
+++ b/drivers/media/video/cx18/cx18-i2c.c
@@ -109,7 +109,7 @@ static int cx18_i2c_new_ir(struct cx18 *cx, struct i2c_adapter *adap, u32 hw,
109 /* Our default information for ir-kbd-i2c.c to use */ 109 /* Our default information for ir-kbd-i2c.c to use */
110 switch (hw) { 110 switch (hw) {
111 case CX18_HW_Z8F0811_IR_RX_HAUP: 111 case CX18_HW_Z8F0811_IR_RX_HAUP:
112 init_data->ir_codes = &ir_codes_hauppauge_new_table; 112 init_data->ir_codes = &IR_KEYTABLE(hauppauge_new);
113 init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR; 113 init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
114 init_data->type = IR_TYPE_RC5; 114 init_data->type = IR_TYPE_RC5;
115 init_data->name = cx->card_name; 115 init_data->name = cx->card_name;
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c
index ef1db2d9668a..66d3e1c64ce6 100644
--- a/drivers/media/video/cx23885/cx23885-input.c
+++ b/drivers/media/video/cx23885/cx23885-input.c
@@ -355,7 +355,7 @@ int cx23885_input_init(struct cx23885_dev *dev)
355 case CX23885_BOARD_HAUPPAUGE_HVR1850: 355 case CX23885_BOARD_HAUPPAUGE_HVR1850:
356 case CX23885_BOARD_HAUPPAUGE_HVR1290: 356 case CX23885_BOARD_HAUPPAUGE_HVR1290:
357 /* Parameters for the grey Hauppauge remote for the HVR-1850 */ 357 /* Parameters for the grey Hauppauge remote for the HVR-1850 */
358 ir_codes = &ir_codes_hauppauge_new_table; 358 ir_codes = &IR_KEYTABLE(hauppauge_new);
359 ir_type = IR_TYPE_RC5; 359 ir_type = IR_TYPE_RC5;
360 ir_addr = 0x1e; /* RC-5 system bits emitted by the remote */ 360 ir_addr = 0x1e; /* RC-5 system bits emitted by the remote */
361 ir_start = RC5_START_BITS_NORMAL; /* A basic RC-5 remote */ 361 ir_start = RC5_START_BITS_NORMAL; /* A basic RC-5 remote */
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index 8bd95be89e67..48ca9805bb90 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -261,14 +261,14 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
261 case CX88_BOARD_DNTV_LIVE_DVB_T: 261 case CX88_BOARD_DNTV_LIVE_DVB_T:
262 case CX88_BOARD_KWORLD_DVB_T: 262 case CX88_BOARD_KWORLD_DVB_T:
263 case CX88_BOARD_KWORLD_DVB_T_CX22702: 263 case CX88_BOARD_KWORLD_DVB_T_CX22702:
264 ir_codes = &ir_codes_dntv_live_dvb_t_table; 264 ir_codes = &IR_KEYTABLE(dntv_live_dvb_t);
265 ir->gpio_addr = MO_GP1_IO; 265 ir->gpio_addr = MO_GP1_IO;
266 ir->mask_keycode = 0x1f; 266 ir->mask_keycode = 0x1f;
267 ir->mask_keyup = 0x60; 267 ir->mask_keyup = 0x60;
268 ir->polling = 50; /* ms */ 268 ir->polling = 50; /* ms */
269 break; 269 break;
270 case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: 270 case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1:
271 ir_codes = &ir_codes_cinergy_1400_table; 271 ir_codes = &IR_KEYTABLE(cinergy_1400);
272 ir_type = IR_TYPE_PD; 272 ir_type = IR_TYPE_PD;
273 ir->sampling = 0xeb04; /* address */ 273 ir->sampling = 0xeb04; /* address */
274 break; 274 break;
@@ -283,14 +283,14 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
283 case CX88_BOARD_PCHDTV_HD3000: 283 case CX88_BOARD_PCHDTV_HD3000:
284 case CX88_BOARD_PCHDTV_HD5500: 284 case CX88_BOARD_PCHDTV_HD5500:
285 case CX88_BOARD_HAUPPAUGE_IRONLY: 285 case CX88_BOARD_HAUPPAUGE_IRONLY:
286 ir_codes = &ir_codes_hauppauge_new_table; 286 ir_codes = &IR_KEYTABLE(hauppauge_new);
287 ir_type = IR_TYPE_RC5; 287 ir_type = IR_TYPE_RC5;
288 ir->sampling = 1; 288 ir->sampling = 1;
289 break; 289 break;
290 case CX88_BOARD_WINFAST_DTV2000H: 290 case CX88_BOARD_WINFAST_DTV2000H:
291 case CX88_BOARD_WINFAST_DTV2000H_J: 291 case CX88_BOARD_WINFAST_DTV2000H_J:
292 case CX88_BOARD_WINFAST_DTV1800H: 292 case CX88_BOARD_WINFAST_DTV1800H:
293 ir_codes = &ir_codes_winfast_table; 293 ir_codes = &IR_KEYTABLE(winfast);
294 ir->gpio_addr = MO_GP0_IO; 294 ir->gpio_addr = MO_GP0_IO;
295 ir->mask_keycode = 0x8f8; 295 ir->mask_keycode = 0x8f8;
296 ir->mask_keyup = 0x100; 296 ir->mask_keyup = 0x100;
@@ -299,14 +299,14 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
299 case CX88_BOARD_WINFAST2000XP_EXPERT: 299 case CX88_BOARD_WINFAST2000XP_EXPERT:
300 case CX88_BOARD_WINFAST_DTV1000: 300 case CX88_BOARD_WINFAST_DTV1000:
301 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL: 301 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
302 ir_codes = &ir_codes_winfast_table; 302 ir_codes = &IR_KEYTABLE(winfast);
303 ir->gpio_addr = MO_GP0_IO; 303 ir->gpio_addr = MO_GP0_IO;
304 ir->mask_keycode = 0x8f8; 304 ir->mask_keycode = 0x8f8;
305 ir->mask_keyup = 0x100; 305 ir->mask_keyup = 0x100;
306 ir->polling = 1; /* ms */ 306 ir->polling = 1; /* ms */
307 break; 307 break;
308 case CX88_BOARD_IODATA_GVBCTV7E: 308 case CX88_BOARD_IODATA_GVBCTV7E:
309 ir_codes = &ir_codes_iodata_bctv7e_table; 309 ir_codes = &IR_KEYTABLE(iodata_bctv7e);
310 ir->gpio_addr = MO_GP0_IO; 310 ir->gpio_addr = MO_GP0_IO;
311 ir->mask_keycode = 0xfd; 311 ir->mask_keycode = 0xfd;
312 ir->mask_keydown = 0x02; 312 ir->mask_keydown = 0x02;
@@ -314,7 +314,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
314 break; 314 break;
315 case CX88_BOARD_PROLINK_PLAYTVPVR: 315 case CX88_BOARD_PROLINK_PLAYTVPVR:
316 case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO: 316 case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO:
317 ir_codes = &ir_codes_pixelview_table; 317 ir_codes = &IR_KEYTABLE(pixelview);
318 ir->gpio_addr = MO_GP1_IO; 318 ir->gpio_addr = MO_GP1_IO;
319 ir->mask_keycode = 0x1f; 319 ir->mask_keycode = 0x1f;
320 ir->mask_keyup = 0x80; 320 ir->mask_keyup = 0x80;
@@ -322,28 +322,28 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
322 break; 322 break;
323 case CX88_BOARD_PROLINK_PV_8000GT: 323 case CX88_BOARD_PROLINK_PV_8000GT:
324 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME: 324 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
325 ir_codes = &ir_codes_pixelview_new_table; 325 ir_codes = &IR_KEYTABLE(pixelview_new);
326 ir->gpio_addr = MO_GP1_IO; 326 ir->gpio_addr = MO_GP1_IO;
327 ir->mask_keycode = 0x3f; 327 ir->mask_keycode = 0x3f;
328 ir->mask_keyup = 0x80; 328 ir->mask_keyup = 0x80;
329 ir->polling = 1; /* ms */ 329 ir->polling = 1; /* ms */
330 break; 330 break;
331 case CX88_BOARD_KWORLD_LTV883: 331 case CX88_BOARD_KWORLD_LTV883:
332 ir_codes = &ir_codes_pixelview_table; 332 ir_codes = &IR_KEYTABLE(pixelview);
333 ir->gpio_addr = MO_GP1_IO; 333 ir->gpio_addr = MO_GP1_IO;
334 ir->mask_keycode = 0x1f; 334 ir->mask_keycode = 0x1f;
335 ir->mask_keyup = 0x60; 335 ir->mask_keyup = 0x60;
336 ir->polling = 1; /* ms */ 336 ir->polling = 1; /* ms */
337 break; 337 break;
338 case CX88_BOARD_ADSTECH_DVB_T_PCI: 338 case CX88_BOARD_ADSTECH_DVB_T_PCI:
339 ir_codes = &ir_codes_adstech_dvb_t_pci_table; 339 ir_codes = &IR_KEYTABLE(adstech_dvb_t_pci);
340 ir->gpio_addr = MO_GP1_IO; 340 ir->gpio_addr = MO_GP1_IO;
341 ir->mask_keycode = 0xbf; 341 ir->mask_keycode = 0xbf;
342 ir->mask_keyup = 0x40; 342 ir->mask_keyup = 0x40;
343 ir->polling = 50; /* ms */ 343 ir->polling = 50; /* ms */
344 break; 344 break;
345 case CX88_BOARD_MSI_TVANYWHERE_MASTER: 345 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
346 ir_codes = &ir_codes_msi_tvanywhere_table; 346 ir_codes = &IR_KEYTABLE(msi_tvanywhere);
347 ir->gpio_addr = MO_GP1_IO; 347 ir->gpio_addr = MO_GP1_IO;
348 ir->mask_keycode = 0x1f; 348 ir->mask_keycode = 0x1f;
349 ir->mask_keyup = 0x40; 349 ir->mask_keyup = 0x40;
@@ -351,7 +351,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
351 break; 351 break;
352 case CX88_BOARD_AVERTV_303: 352 case CX88_BOARD_AVERTV_303:
353 case CX88_BOARD_AVERTV_STUDIO_303: 353 case CX88_BOARD_AVERTV_STUDIO_303:
354 ir_codes = &ir_codes_avertv_303_table; 354 ir_codes = &IR_KEYTABLE(avertv_303);
355 ir->gpio_addr = MO_GP2_IO; 355 ir->gpio_addr = MO_GP2_IO;
356 ir->mask_keycode = 0xfb; 356 ir->mask_keycode = 0xfb;
357 ir->mask_keydown = 0x02; 357 ir->mask_keydown = 0x02;
@@ -364,41 +364,41 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
364 case CX88_BOARD_PROF_7300: 364 case CX88_BOARD_PROF_7300:
365 case CX88_BOARD_PROF_7301: 365 case CX88_BOARD_PROF_7301:
366 case CX88_BOARD_PROF_6200: 366 case CX88_BOARD_PROF_6200:
367 ir_codes = &ir_codes_tbs_nec_table; 367 ir_codes = &IR_KEYTABLE(tbs_nec);
368 ir_type = IR_TYPE_PD; 368 ir_type = IR_TYPE_PD;
369 ir->sampling = 0xff00; /* address */ 369 ir->sampling = 0xff00; /* address */
370 break; 370 break;
371 case CX88_BOARD_TEVII_S460: 371 case CX88_BOARD_TEVII_S460:
372 case CX88_BOARD_TEVII_S420: 372 case CX88_BOARD_TEVII_S420:
373 ir_codes = &ir_codes_tevii_nec_table; 373 ir_codes = &IR_KEYTABLE(tevii_nec);
374 ir_type = IR_TYPE_PD; 374 ir_type = IR_TYPE_PD;
375 ir->sampling = 0xff00; /* address */ 375 ir->sampling = 0xff00; /* address */
376 break; 376 break;
377 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: 377 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
378 ir_codes = &ir_codes_dntv_live_dvbt_pro_table; 378 ir_codes = &IR_KEYTABLE(dntv_live_dvbt_pro);
379 ir_type = IR_TYPE_PD; 379 ir_type = IR_TYPE_PD;
380 ir->sampling = 0xff00; /* address */ 380 ir->sampling = 0xff00; /* address */
381 break; 381 break;
382 case CX88_BOARD_NORWOOD_MICRO: 382 case CX88_BOARD_NORWOOD_MICRO:
383 ir_codes = &ir_codes_norwood_table; 383 ir_codes = &IR_KEYTABLE(norwood);
384 ir->gpio_addr = MO_GP1_IO; 384 ir->gpio_addr = MO_GP1_IO;
385 ir->mask_keycode = 0x0e; 385 ir->mask_keycode = 0x0e;
386 ir->mask_keyup = 0x80; 386 ir->mask_keyup = 0x80;
387 ir->polling = 50; /* ms */ 387 ir->polling = 50; /* ms */
388 break; 388 break;
389 case CX88_BOARD_NPGTECH_REALTV_TOP10FM: 389 case CX88_BOARD_NPGTECH_REALTV_TOP10FM:
390 ir_codes = &ir_codes_npgtech_table; 390 ir_codes = &IR_KEYTABLE(npgtech);
391 ir->gpio_addr = MO_GP0_IO; 391 ir->gpio_addr = MO_GP0_IO;
392 ir->mask_keycode = 0xfa; 392 ir->mask_keycode = 0xfa;
393 ir->polling = 50; /* ms */ 393 ir->polling = 50; /* ms */
394 break; 394 break;
395 case CX88_BOARD_PINNACLE_PCTV_HD_800i: 395 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
396 ir_codes = &ir_codes_pinnacle_pctv_hd_table; 396 ir_codes = &IR_KEYTABLE(pinnacle_pctv_hd);
397 ir_type = IR_TYPE_RC5; 397 ir_type = IR_TYPE_RC5;
398 ir->sampling = 1; 398 ir->sampling = 1;
399 break; 399 break;
400 case CX88_BOARD_POWERCOLOR_REAL_ANGEL: 400 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
401 ir_codes = &ir_codes_powercolor_real_angel_table; 401 ir_codes = &IR_KEYTABLE(powercolor_real_angel);
402 ir->gpio_addr = MO_GP2_IO; 402 ir->gpio_addr = MO_GP2_IO;
403 ir->mask_keycode = 0x7e; 403 ir->mask_keycode = 0x7e;
404 ir->polling = 100; /* ms */ 404 ir->polling = 100; /* ms */
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 7b0ca583de55..29201438b45f 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -602,7 +602,7 @@ struct em28xx_board em28xx_boards[] = {
602 .name = "Gadmei UTV330+", 602 .name = "Gadmei UTV330+",
603 .tuner_type = TUNER_TNF_5335MF, 603 .tuner_type = TUNER_TNF_5335MF,
604 .tda9887_conf = TDA9887_PRESENT, 604 .tda9887_conf = TDA9887_PRESENT,
605 .ir_codes = &ir_codes_gadmei_rm008z_table, 605 .ir_codes = &IR_KEYTABLE(gadmei_rm008z),
606 .decoder = EM28XX_SAA711X, 606 .decoder = EM28XX_SAA711X,
607 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, 607 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
608 .input = { { 608 .input = { {
@@ -791,7 +791,7 @@ struct em28xx_board em28xx_boards[] = {
791 .mts_firmware = 1, 791 .mts_firmware = 1,
792 .has_dvb = 1, 792 .has_dvb = 1,
793 .dvb_gpio = hauppauge_wintv_hvr_900_digital, 793 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
794 .ir_codes = &ir_codes_hauppauge_new_table, 794 .ir_codes = &IR_KEYTABLE(hauppauge_new),
795 .decoder = EM28XX_TVP5150, 795 .decoder = EM28XX_TVP5150,
796 .input = { { 796 .input = { {
797 .type = EM28XX_VMUX_TELEVISION, 797 .type = EM28XX_VMUX_TELEVISION,
@@ -816,7 +816,7 @@ struct em28xx_board em28xx_boards[] = {
816 .tuner_type = TUNER_XC2028, 816 .tuner_type = TUNER_XC2028,
817 .tuner_gpio = default_tuner_gpio, 817 .tuner_gpio = default_tuner_gpio,
818 .mts_firmware = 1, 818 .mts_firmware = 1,
819 .ir_codes = &ir_codes_hauppauge_new_table, 819 .ir_codes = &IR_KEYTABLE(hauppauge_new),
820 .decoder = EM28XX_TVP5150, 820 .decoder = EM28XX_TVP5150,
821 .input = { { 821 .input = { {
822 .type = EM28XX_VMUX_TELEVISION, 822 .type = EM28XX_VMUX_TELEVISION,
@@ -842,7 +842,7 @@ struct em28xx_board em28xx_boards[] = {
842 .mts_firmware = 1, 842 .mts_firmware = 1,
843 .has_dvb = 1, 843 .has_dvb = 1,
844 .dvb_gpio = hauppauge_wintv_hvr_900_digital, 844 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
845 .ir_codes = &ir_codes_hauppauge_new_table, 845 .ir_codes = &IR_KEYTABLE(hauppauge_new),
846 .decoder = EM28XX_TVP5150, 846 .decoder = EM28XX_TVP5150,
847 .input = { { 847 .input = { {
848 .type = EM28XX_VMUX_TELEVISION, 848 .type = EM28XX_VMUX_TELEVISION,
@@ -868,7 +868,7 @@ struct em28xx_board em28xx_boards[] = {
868 .mts_firmware = 1, 868 .mts_firmware = 1,
869 .has_dvb = 1, 869 .has_dvb = 1,
870 .dvb_gpio = hauppauge_wintv_hvr_900_digital, 870 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
871 .ir_codes = &ir_codes_rc5_hauppauge_new_table, 871 .ir_codes = &IR_KEYTABLE(rc5_hauppauge_new),
872 .decoder = EM28XX_TVP5150, 872 .decoder = EM28XX_TVP5150,
873 .input = { { 873 .input = { {
874 .type = EM28XX_VMUX_TELEVISION, 874 .type = EM28XX_VMUX_TELEVISION,
@@ -894,7 +894,7 @@ struct em28xx_board em28xx_boards[] = {
894 .mts_firmware = 1, 894 .mts_firmware = 1,
895 .has_dvb = 1, 895 .has_dvb = 1,
896 .dvb_gpio = hauppauge_wintv_hvr_900_digital, 896 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
897 .ir_codes = &ir_codes_pinnacle_pctv_hd_table, 897 .ir_codes = &IR_KEYTABLE(pinnacle_pctv_hd),
898 .decoder = EM28XX_TVP5150, 898 .decoder = EM28XX_TVP5150,
899 .input = { { 899 .input = { {
900 .type = EM28XX_VMUX_TELEVISION, 900 .type = EM28XX_VMUX_TELEVISION,
@@ -920,7 +920,7 @@ struct em28xx_board em28xx_boards[] = {
920 .mts_firmware = 1, 920 .mts_firmware = 1,
921 .has_dvb = 1, 921 .has_dvb = 1,
922 .dvb_gpio = hauppauge_wintv_hvr_900_digital, 922 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
923 .ir_codes = &ir_codes_ati_tv_wonder_hd_600_table, 923 .ir_codes = &IR_KEYTABLE(ati_tv_wonder_hd_600),
924 .decoder = EM28XX_TVP5150, 924 .decoder = EM28XX_TVP5150,
925 .input = { { 925 .input = { {
926 .type = EM28XX_VMUX_TELEVISION, 926 .type = EM28XX_VMUX_TELEVISION,
@@ -946,7 +946,7 @@ struct em28xx_board em28xx_boards[] = {
946 .decoder = EM28XX_TVP5150, 946 .decoder = EM28XX_TVP5150,
947 .has_dvb = 1, 947 .has_dvb = 1,
948 .dvb_gpio = default_digital, 948 .dvb_gpio = default_digital,
949 .ir_codes = &ir_codes_terratec_cinergy_xs_table, 949 .ir_codes = &IR_KEYTABLE(terratec_cinergy_xs),
950 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ 950 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
951 .input = { { 951 .input = { {
952 .type = EM28XX_VMUX_TELEVISION, 952 .type = EM28XX_VMUX_TELEVISION,
@@ -1296,7 +1296,7 @@ struct em28xx_board em28xx_boards[] = {
1296 .decoder = EM28XX_SAA711X, 1296 .decoder = EM28XX_SAA711X,
1297 .has_dvb = 1, 1297 .has_dvb = 1,
1298 .dvb_gpio = em2882_kworld_315u_digital, 1298 .dvb_gpio = em2882_kworld_315u_digital,
1299 .ir_codes = &ir_codes_kworld_315u_table, 1299 .ir_codes = &IR_KEYTABLE(kworld_315u),
1300 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, 1300 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
1301 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, 1301 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
1302 /* Analog mode - still not ready */ 1302 /* Analog mode - still not ready */
@@ -1425,7 +1425,7 @@ struct em28xx_board em28xx_boards[] = {
1425 .has_dvb = 1, 1425 .has_dvb = 1,
1426 .dvb_gpio = kworld_330u_digital, 1426 .dvb_gpio = kworld_330u_digital,
1427 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ 1427 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
1428 .ir_codes = &ir_codes_kworld_315u_table, 1428 .ir_codes = &IR_KEYTABLE(kworld_315u),
1429 .input = { { 1429 .input = { {
1430 .type = EM28XX_VMUX_TELEVISION, 1430 .type = EM28XX_VMUX_TELEVISION,
1431 .vmux = TVP5150_COMPOSITE0, 1431 .vmux = TVP5150_COMPOSITE0,
@@ -1448,7 +1448,7 @@ struct em28xx_board em28xx_boards[] = {
1448 .decoder = EM28XX_TVP5150, 1448 .decoder = EM28XX_TVP5150,
1449 .has_dvb = 1, 1449 .has_dvb = 1,
1450 .dvb_gpio = hauppauge_wintv_hvr_900_digital, 1450 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
1451 .ir_codes = &ir_codes_terratec_cinergy_xs_table, 1451 .ir_codes = &IR_KEYTABLE(terratec_cinergy_xs),
1452 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, 1452 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
1453 .input = { { 1453 .input = { {
1454 .type = EM28XX_VMUX_TELEVISION, 1454 .type = EM28XX_VMUX_TELEVISION,
@@ -1541,7 +1541,7 @@ struct em28xx_board em28xx_boards[] = {
1541 .mts_firmware = 1, 1541 .mts_firmware = 1,
1542 .decoder = EM28XX_TVP5150, 1542 .decoder = EM28XX_TVP5150,
1543 .tuner_gpio = default_tuner_gpio, 1543 .tuner_gpio = default_tuner_gpio,
1544 .ir_codes = &ir_codes_kaiomy_table, 1544 .ir_codes = &IR_KEYTABLE(kaiomy),
1545 .input = { { 1545 .input = { {
1546 .type = EM28XX_VMUX_TELEVISION, 1546 .type = EM28XX_VMUX_TELEVISION,
1547 .vmux = TVP5150_COMPOSITE0, 1547 .vmux = TVP5150_COMPOSITE0,
@@ -1641,7 +1641,7 @@ struct em28xx_board em28xx_boards[] = {
1641 .mts_firmware = 1, 1641 .mts_firmware = 1,
1642 .has_dvb = 1, 1642 .has_dvb = 1,
1643 .dvb_gpio = evga_indtube_digital, 1643 .dvb_gpio = evga_indtube_digital,
1644 .ir_codes = &ir_codes_evga_indtube_table, 1644 .ir_codes = &IR_KEYTABLE(evga_indtube),
1645 .input = { { 1645 .input = { {
1646 .type = EM28XX_VMUX_TELEVISION, 1646 .type = EM28XX_VMUX_TELEVISION,
1647 .vmux = TVP5150_COMPOSITE0, 1647 .vmux = TVP5150_COMPOSITE0,
@@ -2335,21 +2335,21 @@ void em28xx_register_i2c_ir(struct em28xx *dev)
2335 switch (dev->model) { 2335 switch (dev->model) {
2336 case EM2800_BOARD_TERRATEC_CINERGY_200: 2336 case EM2800_BOARD_TERRATEC_CINERGY_200:
2337 case EM2820_BOARD_TERRATEC_CINERGY_250: 2337 case EM2820_BOARD_TERRATEC_CINERGY_250:
2338 dev->init_data.ir_codes = &ir_codes_em_terratec_table; 2338 dev->init_data.ir_codes = &IR_KEYTABLE(em_terratec);
2339 dev->init_data.get_key = em28xx_get_key_terratec; 2339 dev->init_data.get_key = em28xx_get_key_terratec;
2340 dev->init_data.name = "i2c IR (EM28XX Terratec)"; 2340 dev->init_data.name = "i2c IR (EM28XX Terratec)";
2341 break; 2341 break;
2342 case EM2820_BOARD_PINNACLE_USB_2: 2342 case EM2820_BOARD_PINNACLE_USB_2:
2343 dev->init_data.ir_codes = &ir_codes_pinnacle_grey_table; 2343 dev->init_data.ir_codes = &IR_KEYTABLE(pinnacle_grey);
2344 dev->init_data.get_key = em28xx_get_key_pinnacle_usb_grey; 2344 dev->init_data.get_key = em28xx_get_key_pinnacle_usb_grey;
2345 dev->init_data.name = "i2c IR (EM28XX Pinnacle PCTV)"; 2345 dev->init_data.name = "i2c IR (EM28XX Pinnacle PCTV)";
2346 break; 2346 break;
2347 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: 2347 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
2348 dev->init_data.ir_codes = &ir_codes_rc5_hauppauge_new_table; 2348 dev->init_data.ir_codes = &IR_KEYTABLE(rc5_hauppauge_new);
2349 dev->init_data.get_key = em28xx_get_key_em_haup; 2349 dev->init_data.get_key = em28xx_get_key_em_haup;
2350 dev->init_data.name = "i2c IR (EM2840 Hauppauge)"; 2350 dev->init_data.name = "i2c IR (EM2840 Hauppauge)";
2351 case EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE: 2351 case EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE:
2352 dev->init_data.ir_codes = &ir_codes_winfast_usbii_deluxe_table;; 2352 dev->init_data.ir_codes = &IR_KEYTABLE(winfast_usbii_deluxe);;
2353 dev->init_data.get_key = em28xx_get_key_winfast_usbii_deluxe; 2353 dev->init_data.get_key = em28xx_get_key_winfast_usbii_deluxe;
2354 dev->init_data.name = "i2c IR (EM2820 Winfast TV USBII Deluxe)"; 2354 dev->init_data.name = "i2c IR (EM2820 Winfast TV USBII Deluxe)";
2355 break; 2355 break;
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 6af69d5c8499..607a0be2ec63 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -322,13 +322,13 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
322 name = "Pixelview"; 322 name = "Pixelview";
323 ir->get_key = get_key_pixelview; 323 ir->get_key = get_key_pixelview;
324 ir_type = IR_TYPE_OTHER; 324 ir_type = IR_TYPE_OTHER;
325 ir_codes = &ir_codes_empty_table; 325 ir_codes = &IR_KEYTABLE(empty);
326 break; 326 break;
327 case 0x4b: 327 case 0x4b:
328 name = "PV951"; 328 name = "PV951";
329 ir->get_key = get_key_pv951; 329 ir->get_key = get_key_pv951;
330 ir_type = IR_TYPE_OTHER; 330 ir_type = IR_TYPE_OTHER;
331 ir_codes = &ir_codes_pv951_table; 331 ir_codes = &IR_KEYTABLE(pv951);
332 break; 332 break;
333 case 0x18: 333 case 0x18:
334 case 0x1f: 334 case 0x1f:
@@ -337,22 +337,22 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
337 ir->get_key = get_key_haup; 337 ir->get_key = get_key_haup;
338 ir_type = IR_TYPE_RC5; 338 ir_type = IR_TYPE_RC5;
339 if (hauppauge == 1) { 339 if (hauppauge == 1) {
340 ir_codes = &ir_codes_hauppauge_new_table; 340 ir_codes = &IR_KEYTABLE(hauppauge_new);
341 } else { 341 } else {
342 ir_codes = &ir_codes_rc5_tv_table; 342 ir_codes = &IR_KEYTABLE(rc5_tv);
343 } 343 }
344 break; 344 break;
345 case 0x30: 345 case 0x30:
346 name = "KNC One"; 346 name = "KNC One";
347 ir->get_key = get_key_knc1; 347 ir->get_key = get_key_knc1;
348 ir_type = IR_TYPE_OTHER; 348 ir_type = IR_TYPE_OTHER;
349 ir_codes = &ir_codes_empty_table; 349 ir_codes = &IR_KEYTABLE(empty);
350 break; 350 break;
351 case 0x6b: 351 case 0x6b:
352 name = "FusionHDTV"; 352 name = "FusionHDTV";
353 ir->get_key = get_key_fusionhdtv; 353 ir->get_key = get_key_fusionhdtv;
354 ir_type = IR_TYPE_RC5; 354 ir_type = IR_TYPE_RC5;
355 ir_codes = &ir_codes_fusionhdtv_mce_table; 355 ir_codes = &IR_KEYTABLE(fusionhdtv_mce);
356 break; 356 break;
357 case 0x0b: 357 case 0x0b:
358 case 0x47: 358 case 0x47:
@@ -365,9 +365,9 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
365 ir_type = IR_TYPE_RC5; 365 ir_type = IR_TYPE_RC5;
366 ir->get_key = get_key_haup_xvr; 366 ir->get_key = get_key_haup_xvr;
367 if (hauppauge == 1) { 367 if (hauppauge == 1) {
368 ir_codes = &ir_codes_hauppauge_new_table; 368 ir_codes = &IR_KEYTABLE(hauppauge_new);
369 } else { 369 } else {
370 ir_codes = &ir_codes_rc5_tv_table; 370 ir_codes = &IR_KEYTABLE(rc5_tv);
371 } 371 }
372 } else { 372 } else {
373 /* Handled by saa7134-input */ 373 /* Handled by saa7134-input */
@@ -379,7 +379,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
379 name = "AVerMedia Cardbus remote"; 379 name = "AVerMedia Cardbus remote";
380 ir->get_key = get_key_avermedia_cardbus; 380 ir->get_key = get_key_avermedia_cardbus;
381 ir_type = IR_TYPE_OTHER; 381 ir_type = IR_TYPE_OTHER;
382 ir_codes = &ir_codes_avermedia_cardbus_table; 382 ir_codes = &IR_KEYTABLE(avermedia_cardbus);
383 break; 383 break;
384 } 384 }
385 385
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c
index 2ee03c2a1b58..a363e334a50e 100644
--- a/drivers/media/video/ivtv/ivtv-i2c.c
+++ b/drivers/media/video/ivtv/ivtv-i2c.c
@@ -193,7 +193,7 @@ static int ivtv_i2c_new_ir(struct ivtv *itv, u32 hw, const char *type, u8 addr)
193 /* Our default information for ir-kbd-i2c.c to use */ 193 /* Our default information for ir-kbd-i2c.c to use */
194 switch (hw) { 194 switch (hw) {
195 case IVTV_HW_I2C_IR_RX_AVER: 195 case IVTV_HW_I2C_IR_RX_AVER:
196 init_data->ir_codes = &ir_codes_avermedia_cardbus_table; 196 init_data->ir_codes = &IR_KEYTABLE(avermedia_cardbus);
197 init_data->internal_get_key_func = 197 init_data->internal_get_key_func =
198 IR_KBD_GET_KEY_AVERMEDIA_CARDBUS; 198 IR_KBD_GET_KEY_AVERMEDIA_CARDBUS;
199 init_data->type = IR_TYPE_OTHER; 199 init_data->type = IR_TYPE_OTHER;
@@ -202,14 +202,14 @@ static int ivtv_i2c_new_ir(struct ivtv *itv, u32 hw, const char *type, u8 addr)
202 case IVTV_HW_I2C_IR_RX_HAUP_EXT: 202 case IVTV_HW_I2C_IR_RX_HAUP_EXT:
203 case IVTV_HW_I2C_IR_RX_HAUP_INT: 203 case IVTV_HW_I2C_IR_RX_HAUP_INT:
204 /* Default to old black remote */ 204 /* Default to old black remote */
205 init_data->ir_codes = &ir_codes_rc5_tv_table; 205 init_data->ir_codes = &IR_KEYTABLE(rc5_tv);
206 init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP; 206 init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP;
207 init_data->type = IR_TYPE_RC5; 207 init_data->type = IR_TYPE_RC5;
208 init_data->name = itv->card_name; 208 init_data->name = itv->card_name;
209 break; 209 break;
210 case IVTV_HW_Z8F0811_IR_RX_HAUP: 210 case IVTV_HW_Z8F0811_IR_RX_HAUP:
211 /* Default to grey remote */ 211 /* Default to grey remote */
212 init_data->ir_codes = &ir_codes_hauppauge_new_table; 212 init_data->ir_codes = &IR_KEYTABLE(hauppauge_new);
213 init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR; 213 init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
214 init_data->type = IR_TYPE_RC5; 214 init_data->type = IR_TYPE_RC5;
215 init_data->name = itv->card_name; 215 init_data->name = itv->card_name;
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index c8c1c9ae6a79..eaafed181d50 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -610,27 +610,27 @@ int saa7134_input_init1(struct saa7134_dev *dev)
610 case SAA7134_BOARD_FLYTVPLATINUM_FM: 610 case SAA7134_BOARD_FLYTVPLATINUM_FM:
611 case SAA7134_BOARD_FLYTVPLATINUM_MINI2: 611 case SAA7134_BOARD_FLYTVPLATINUM_MINI2:
612 case SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM: 612 case SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM:
613 ir_codes = &ir_codes_flyvideo_table; 613 ir_codes = &IR_KEYTABLE(flyvideo);
614 mask_keycode = 0xEC00000; 614 mask_keycode = 0xEC00000;
615 mask_keydown = 0x0040000; 615 mask_keydown = 0x0040000;
616 break; 616 break;
617 case SAA7134_BOARD_CINERGY400: 617 case SAA7134_BOARD_CINERGY400:
618 case SAA7134_BOARD_CINERGY600: 618 case SAA7134_BOARD_CINERGY600:
619 case SAA7134_BOARD_CINERGY600_MK3: 619 case SAA7134_BOARD_CINERGY600_MK3:
620 ir_codes = &ir_codes_cinergy_table; 620 ir_codes = &IR_KEYTABLE(cinergy);
621 mask_keycode = 0x00003f; 621 mask_keycode = 0x00003f;
622 mask_keyup = 0x040000; 622 mask_keyup = 0x040000;
623 break; 623 break;
624 case SAA7134_BOARD_ECS_TVP3XP: 624 case SAA7134_BOARD_ECS_TVP3XP:
625 case SAA7134_BOARD_ECS_TVP3XP_4CB5: 625 case SAA7134_BOARD_ECS_TVP3XP_4CB5:
626 ir_codes = &ir_codes_eztv_table; 626 ir_codes = &IR_KEYTABLE(eztv);
627 mask_keycode = 0x00017c; 627 mask_keycode = 0x00017c;
628 mask_keyup = 0x000002; 628 mask_keyup = 0x000002;
629 polling = 50; // ms 629 polling = 50; // ms
630 break; 630 break;
631 case SAA7134_BOARD_KWORLD_XPERT: 631 case SAA7134_BOARD_KWORLD_XPERT:
632 case SAA7134_BOARD_AVACSSMARTTV: 632 case SAA7134_BOARD_AVACSSMARTTV:
633 ir_codes = &ir_codes_pixelview_table; 633 ir_codes = &IR_KEYTABLE(pixelview);
634 mask_keycode = 0x00001F; 634 mask_keycode = 0x00001F;
635 mask_keyup = 0x000020; 635 mask_keyup = 0x000020;
636 polling = 50; // ms 636 polling = 50; // ms
@@ -647,7 +647,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
647 case SAA7134_BOARD_AVERMEDIA_GO_007_FM: 647 case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
648 case SAA7134_BOARD_AVERMEDIA_M102: 648 case SAA7134_BOARD_AVERMEDIA_M102:
649 case SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS: 649 case SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS:
650 ir_codes = &ir_codes_avermedia_table; 650 ir_codes = &IR_KEYTABLE(avermedia);
651 mask_keycode = 0x0007C8; 651 mask_keycode = 0x0007C8;
652 mask_keydown = 0x000010; 652 mask_keydown = 0x000010;
653 polling = 50; // ms 653 polling = 50; // ms
@@ -656,14 +656,14 @@ int saa7134_input_init1(struct saa7134_dev *dev)
656 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); 656 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
657 break; 657 break;
658 case SAA7134_BOARD_AVERMEDIA_M135A: 658 case SAA7134_BOARD_AVERMEDIA_M135A:
659 ir_codes = &ir_codes_avermedia_m135a_rm_jx_table; 659 ir_codes = &IR_KEYTABLE(avermedia_m135a_rm_jx);
660 mask_keydown = 0x0040000; 660 mask_keydown = 0x0040000;
661 mask_keycode = 0xffff; 661 mask_keycode = 0xffff;
662 raw_decode = 1; 662 raw_decode = 1;
663 break; 663 break;
664 case SAA7134_BOARD_AVERMEDIA_777: 664 case SAA7134_BOARD_AVERMEDIA_777:
665 case SAA7134_BOARD_AVERMEDIA_A16AR: 665 case SAA7134_BOARD_AVERMEDIA_A16AR:
666 ir_codes = &ir_codes_avermedia_table; 666 ir_codes = &IR_KEYTABLE(avermedia);
667 mask_keycode = 0x02F200; 667 mask_keycode = 0x02F200;
668 mask_keydown = 0x000400; 668 mask_keydown = 0x000400;
669 polling = 50; // ms 669 polling = 50; // ms
@@ -672,7 +672,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
672 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1); 672 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
673 break; 673 break;
674 case SAA7134_BOARD_AVERMEDIA_A16D: 674 case SAA7134_BOARD_AVERMEDIA_A16D:
675 ir_codes = &ir_codes_avermedia_a16d_table; 675 ir_codes = &IR_KEYTABLE(avermedia_a16d);
676 mask_keycode = 0x02F200; 676 mask_keycode = 0x02F200;
677 mask_keydown = 0x000400; 677 mask_keydown = 0x000400;
678 polling = 50; /* ms */ 678 polling = 50; /* ms */
@@ -681,14 +681,14 @@ int saa7134_input_init1(struct saa7134_dev *dev)
681 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1); 681 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
682 break; 682 break;
683 case SAA7134_BOARD_KWORLD_TERMINATOR: 683 case SAA7134_BOARD_KWORLD_TERMINATOR:
684 ir_codes = &ir_codes_pixelview_table; 684 ir_codes = &IR_KEYTABLE(pixelview);
685 mask_keycode = 0x00001f; 685 mask_keycode = 0x00001f;
686 mask_keyup = 0x000060; 686 mask_keyup = 0x000060;
687 polling = 50; // ms 687 polling = 50; // ms
688 break; 688 break;
689 case SAA7134_BOARD_MANLI_MTV001: 689 case SAA7134_BOARD_MANLI_MTV001:
690 case SAA7134_BOARD_MANLI_MTV002: 690 case SAA7134_BOARD_MANLI_MTV002:
691 ir_codes = &ir_codes_manli_table; 691 ir_codes = &IR_KEYTABLE(manli);
692 mask_keycode = 0x001f00; 692 mask_keycode = 0x001f00;
693 mask_keyup = 0x004000; 693 mask_keyup = 0x004000;
694 polling = 50; /* ms */ 694 polling = 50; /* ms */
@@ -708,25 +708,25 @@ int saa7134_input_init1(struct saa7134_dev *dev)
708 case SAA7134_BOARD_BEHOLD_507_9FM: 708 case SAA7134_BOARD_BEHOLD_507_9FM:
709 case SAA7134_BOARD_BEHOLD_507RDS_MK3: 709 case SAA7134_BOARD_BEHOLD_507RDS_MK3:
710 case SAA7134_BOARD_BEHOLD_507RDS_MK5: 710 case SAA7134_BOARD_BEHOLD_507RDS_MK5:
711 ir_codes = &ir_codes_manli_table; 711 ir_codes = &IR_KEYTABLE(manli);
712 mask_keycode = 0x003f00; 712 mask_keycode = 0x003f00;
713 mask_keyup = 0x004000; 713 mask_keyup = 0x004000;
714 polling = 50; /* ms */ 714 polling = 50; /* ms */
715 break; 715 break;
716 case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM: 716 case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM:
717 ir_codes = &ir_codes_behold_columbus_table; 717 ir_codes = &IR_KEYTABLE(behold_columbus);
718 mask_keycode = 0x003f00; 718 mask_keycode = 0x003f00;
719 mask_keyup = 0x004000; 719 mask_keyup = 0x004000;
720 polling = 50; // ms 720 polling = 50; // ms
721 break; 721 break;
722 case SAA7134_BOARD_SEDNA_PC_TV_CARDBUS: 722 case SAA7134_BOARD_SEDNA_PC_TV_CARDBUS:
723 ir_codes = &ir_codes_pctv_sedna_table; 723 ir_codes = &IR_KEYTABLE(pctv_sedna);
724 mask_keycode = 0x001f00; 724 mask_keycode = 0x001f00;
725 mask_keyup = 0x004000; 725 mask_keyup = 0x004000;
726 polling = 50; // ms 726 polling = 50; // ms
727 break; 727 break;
728 case SAA7134_BOARD_GOTVIEW_7135: 728 case SAA7134_BOARD_GOTVIEW_7135:
729 ir_codes = &ir_codes_gotview7135_table; 729 ir_codes = &IR_KEYTABLE(gotview7135);
730 mask_keycode = 0x0003CC; 730 mask_keycode = 0x0003CC;
731 mask_keydown = 0x000010; 731 mask_keydown = 0x000010;
732 polling = 5; /* ms */ 732 polling = 5; /* ms */
@@ -735,80 +735,80 @@ int saa7134_input_init1(struct saa7134_dev *dev)
735 case SAA7134_BOARD_VIDEOMATE_TV_PVR: 735 case SAA7134_BOARD_VIDEOMATE_TV_PVR:
736 case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: 736 case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS:
737 case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII: 737 case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII:
738 ir_codes = &ir_codes_videomate_tv_pvr_table; 738 ir_codes = &IR_KEYTABLE(videomate_tv_pvr);
739 mask_keycode = 0x00003F; 739 mask_keycode = 0x00003F;
740 mask_keyup = 0x400000; 740 mask_keyup = 0x400000;
741 polling = 50; // ms 741 polling = 50; // ms
742 break; 742 break;
743 case SAA7134_BOARD_PROTEUS_2309: 743 case SAA7134_BOARD_PROTEUS_2309:
744 ir_codes = &ir_codes_proteus_2309_table; 744 ir_codes = &IR_KEYTABLE(proteus_2309);
745 mask_keycode = 0x00007F; 745 mask_keycode = 0x00007F;
746 mask_keyup = 0x000080; 746 mask_keyup = 0x000080;
747 polling = 50; // ms 747 polling = 50; // ms
748 break; 748 break;
749 case SAA7134_BOARD_VIDEOMATE_DVBT_300: 749 case SAA7134_BOARD_VIDEOMATE_DVBT_300:
750 case SAA7134_BOARD_VIDEOMATE_DVBT_200: 750 case SAA7134_BOARD_VIDEOMATE_DVBT_200:
751 ir_codes = &ir_codes_videomate_tv_pvr_table; 751 ir_codes = &IR_KEYTABLE(videomate_tv_pvr);
752 mask_keycode = 0x003F00; 752 mask_keycode = 0x003F00;
753 mask_keyup = 0x040000; 753 mask_keyup = 0x040000;
754 break; 754 break;
755 case SAA7134_BOARD_FLYDVBS_LR300: 755 case SAA7134_BOARD_FLYDVBS_LR300:
756 case SAA7134_BOARD_FLYDVBT_LR301: 756 case SAA7134_BOARD_FLYDVBT_LR301:
757 case SAA7134_BOARD_FLYDVBTDUO: 757 case SAA7134_BOARD_FLYDVBTDUO:
758 ir_codes = &ir_codes_flydvb_table; 758 ir_codes = &IR_KEYTABLE(flydvb);
759 mask_keycode = 0x0001F00; 759 mask_keycode = 0x0001F00;
760 mask_keydown = 0x0040000; 760 mask_keydown = 0x0040000;
761 break; 761 break;
762 case SAA7134_BOARD_ASUSTeK_P7131_DUAL: 762 case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
763 case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: 763 case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA:
764 case SAA7134_BOARD_ASUSTeK_P7131_ANALOG: 764 case SAA7134_BOARD_ASUSTeK_P7131_ANALOG:
765 ir_codes = &ir_codes_asus_pc39_table; 765 ir_codes = &IR_KEYTABLE(asus_pc39);
766 mask_keydown = 0x0040000; 766 mask_keydown = 0x0040000;
767 rc5_gpio = 1; 767 rc5_gpio = 1;
768 break; 768 break;
769 case SAA7134_BOARD_ENCORE_ENLTV: 769 case SAA7134_BOARD_ENCORE_ENLTV:
770 case SAA7134_BOARD_ENCORE_ENLTV_FM: 770 case SAA7134_BOARD_ENCORE_ENLTV_FM:
771 ir_codes = &ir_codes_encore_enltv_table; 771 ir_codes = &IR_KEYTABLE(encore_enltv);
772 mask_keycode = 0x00007f; 772 mask_keycode = 0x00007f;
773 mask_keyup = 0x040000; 773 mask_keyup = 0x040000;
774 polling = 50; // ms 774 polling = 50; // ms
775 break; 775 break;
776 case SAA7134_BOARD_ENCORE_ENLTV_FM53: 776 case SAA7134_BOARD_ENCORE_ENLTV_FM53:
777 ir_codes = &ir_codes_encore_enltv_fm53_table; 777 ir_codes = &IR_KEYTABLE(encore_enltv_fm53);
778 mask_keydown = 0x0040000; 778 mask_keydown = 0x0040000;
779 mask_keycode = 0x00007f; 779 mask_keycode = 0x00007f;
780 nec_gpio = 1; 780 nec_gpio = 1;
781 break; 781 break;
782 case SAA7134_BOARD_10MOONSTVMASTER3: 782 case SAA7134_BOARD_10MOONSTVMASTER3:
783 ir_codes = &ir_codes_encore_enltv_table; 783 ir_codes = &IR_KEYTABLE(encore_enltv);
784 mask_keycode = 0x5f80000; 784 mask_keycode = 0x5f80000;
785 mask_keyup = 0x8000000; 785 mask_keyup = 0x8000000;
786 polling = 50; //ms 786 polling = 50; //ms
787 break; 787 break;
788 case SAA7134_BOARD_GENIUS_TVGO_A11MCE: 788 case SAA7134_BOARD_GENIUS_TVGO_A11MCE:
789 ir_codes = &ir_codes_genius_tvgo_a11mce_table; 789 ir_codes = &IR_KEYTABLE(genius_tvgo_a11mce);
790 mask_keycode = 0xff; 790 mask_keycode = 0xff;
791 mask_keydown = 0xf00000; 791 mask_keydown = 0xf00000;
792 polling = 50; /* ms */ 792 polling = 50; /* ms */
793 break; 793 break;
794 case SAA7134_BOARD_REAL_ANGEL_220: 794 case SAA7134_BOARD_REAL_ANGEL_220:
795 ir_codes = &ir_codes_real_audio_220_32_keys_table; 795 ir_codes = &IR_KEYTABLE(real_audio_220_32_keys);
796 mask_keycode = 0x3f00; 796 mask_keycode = 0x3f00;
797 mask_keyup = 0x4000; 797 mask_keyup = 0x4000;
798 polling = 50; /* ms */ 798 polling = 50; /* ms */
799 break; 799 break;
800 case SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG: 800 case SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG:
801 ir_codes = &ir_codes_kworld_plus_tv_analog_table; 801 ir_codes = &IR_KEYTABLE(kworld_plus_tv_analog);
802 mask_keycode = 0x7f; 802 mask_keycode = 0x7f;
803 polling = 40; /* ms */ 803 polling = 40; /* ms */
804 break; 804 break;
805 case SAA7134_BOARD_VIDEOMATE_S350: 805 case SAA7134_BOARD_VIDEOMATE_S350:
806 ir_codes = &ir_codes_videomate_s350_table; 806 ir_codes = &IR_KEYTABLE(videomate_s350);
807 mask_keycode = 0x003f00; 807 mask_keycode = 0x003f00;
808 mask_keydown = 0x040000; 808 mask_keydown = 0x040000;
809 break; 809 break;
810 case SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S: 810 case SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S:
811 ir_codes = &ir_codes_winfast_table; 811 ir_codes = &IR_KEYTABLE(winfast);
812 mask_keycode = 0x5f00; 812 mask_keycode = 0x5f00;
813 mask_keyup = 0x020000; 813 mask_keyup = 0x020000;
814 polling = 50; /* ms */ 814 polling = 50; /* ms */
@@ -938,24 +938,24 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
938 dev->init_data.name = "Pinnacle PCTV"; 938 dev->init_data.name = "Pinnacle PCTV";
939 if (pinnacle_remote == 0) { 939 if (pinnacle_remote == 0) {
940 dev->init_data.get_key = get_key_pinnacle_color; 940 dev->init_data.get_key = get_key_pinnacle_color;
941 dev->init_data.ir_codes = &ir_codes_pinnacle_color_table; 941 dev->init_data.ir_codes = &IR_KEYTABLE(pinnacle_color);
942 info.addr = 0x47; 942 info.addr = 0x47;
943 } else { 943 } else {
944 dev->init_data.get_key = get_key_pinnacle_grey; 944 dev->init_data.get_key = get_key_pinnacle_grey;
945 dev->init_data.ir_codes = &ir_codes_pinnacle_grey_table; 945 dev->init_data.ir_codes = &IR_KEYTABLE(pinnacle_grey);
946 info.addr = 0x47; 946 info.addr = 0x47;
947 } 947 }
948 break; 948 break;
949 case SAA7134_BOARD_UPMOST_PURPLE_TV: 949 case SAA7134_BOARD_UPMOST_PURPLE_TV:
950 dev->init_data.name = "Purple TV"; 950 dev->init_data.name = "Purple TV";
951 dev->init_data.get_key = get_key_purpletv; 951 dev->init_data.get_key = get_key_purpletv;
952 dev->init_data.ir_codes = &ir_codes_purpletv_table; 952 dev->init_data.ir_codes = &IR_KEYTABLE(purpletv);
953 info.addr = 0x7a; 953 info.addr = 0x7a;
954 break; 954 break;
955 case SAA7134_BOARD_MSI_TVATANYWHERE_PLUS: 955 case SAA7134_BOARD_MSI_TVATANYWHERE_PLUS:
956 dev->init_data.name = "MSI TV@nywhere Plus"; 956 dev->init_data.name = "MSI TV@nywhere Plus";
957 dev->init_data.get_key = get_key_msi_tvanywhere_plus; 957 dev->init_data.get_key = get_key_msi_tvanywhere_plus;
958 dev->init_data.ir_codes = &ir_codes_msi_tvanywhere_plus_table; 958 dev->init_data.ir_codes = &IR_KEYTABLE(msi_tvanywhere_plus);
959 info.addr = 0x30; 959 info.addr = 0x30;
960 /* MSI TV@nywhere Plus controller doesn't seem to 960 /* MSI TV@nywhere Plus controller doesn't seem to
961 respond to probes unless we read something from 961 respond to probes unless we read something from
@@ -969,7 +969,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
969 case SAA7134_BOARD_HAUPPAUGE_HVR1110: 969 case SAA7134_BOARD_HAUPPAUGE_HVR1110:
970 dev->init_data.name = "HVR 1110"; 970 dev->init_data.name = "HVR 1110";
971 dev->init_data.get_key = get_key_hvr1110; 971 dev->init_data.get_key = get_key_hvr1110;
972 dev->init_data.ir_codes = &ir_codes_hauppauge_new_table; 972 dev->init_data.ir_codes = &IR_KEYTABLE(hauppauge_new);
973 info.addr = 0x71; 973 info.addr = 0x71;
974 break; 974 break;
975 case SAA7134_BOARD_BEHOLD_607FM_MK3: 975 case SAA7134_BOARD_BEHOLD_607FM_MK3:
@@ -987,7 +987,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
987 case SAA7134_BOARD_BEHOLD_X7: 987 case SAA7134_BOARD_BEHOLD_X7:
988 dev->init_data.name = "BeholdTV"; 988 dev->init_data.name = "BeholdTV";
989 dev->init_data.get_key = get_key_beholdm6xx; 989 dev->init_data.get_key = get_key_beholdm6xx;
990 dev->init_data.ir_codes = &ir_codes_behold_table; 990 dev->init_data.ir_codes = &IR_KEYTABLE(behold);
991 dev->init_data.type = IR_TYPE_NEC; 991 dev->init_data.type = IR_TYPE_NEC;
992 info.addr = 0x2d; 992 info.addr = 0x2d;
993 break; 993 break;
@@ -998,7 +998,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
998 case SAA7134_BOARD_FLYDVB_TRIO: 998 case SAA7134_BOARD_FLYDVB_TRIO:
999 dev->init_data.name = "FlyDVB Trio"; 999 dev->init_data.name = "FlyDVB Trio";
1000 dev->init_data.get_key = get_key_flydvb_trio; 1000 dev->init_data.get_key = get_key_flydvb_trio;
1001 dev->init_data.ir_codes = &ir_codes_flydvb_table; 1001 dev->init_data.ir_codes = &IR_KEYTABLE(flydvb);
1002 info.addr = 0x0b; 1002 info.addr = 0x0b;
1003 break; 1003 break;
1004 default: 1004 default: