diff options
Diffstat (limited to 'drivers/media/video/cx18')
-rw-r--r-- | drivers/media/video/cx18/cx18-i2c.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c index 766ddce5780f..da395fef50df 100644 --- a/drivers/media/video/cx18/cx18-i2c.c +++ b/drivers/media/video/cx18/cx18-i2c.c | |||
@@ -97,11 +97,17 @@ static const char * const hw_devicenames[] = { | |||
97 | "ir_rx_z8f0811_haup", | 97 | "ir_rx_z8f0811_haup", |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static const struct IR_i2c_init_data z8f0811_ir_init_data = { | ||
101 | .ir_codes = &ir_codes_hauppauge_new_table, | ||
102 | .internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR, | ||
103 | .type = IR_TYPE_RC5, | ||
104 | .name = "CX23418 Z8F0811 Hauppauge", | ||
105 | }; | ||
106 | |||
100 | static int cx18_i2c_new_ir(struct i2c_adapter *adap, u32 hw, const char *type, | 107 | static int cx18_i2c_new_ir(struct i2c_adapter *adap, u32 hw, const char *type, |
101 | u8 addr) | 108 | u8 addr) |
102 | { | 109 | { |
103 | struct i2c_board_info info; | 110 | struct i2c_board_info info; |
104 | struct IR_i2c_init_data ir_init_data; | ||
105 | unsigned short addr_list[2] = { addr, I2C_CLIENT_END }; | 111 | unsigned short addr_list[2] = { addr, I2C_CLIENT_END }; |
106 | 112 | ||
107 | memset(&info, 0, sizeof(struct i2c_board_info)); | 113 | memset(&info, 0, sizeof(struct i2c_board_info)); |
@@ -110,12 +116,7 @@ static int cx18_i2c_new_ir(struct i2c_adapter *adap, u32 hw, const char *type, | |||
110 | /* Our default information for ir-kbd-i2c.c to use */ | 116 | /* Our default information for ir-kbd-i2c.c to use */ |
111 | switch (hw) { | 117 | switch (hw) { |
112 | case CX18_HW_Z8F0811_IR_RX_HAUP: | 118 | case CX18_HW_Z8F0811_IR_RX_HAUP: |
113 | memset(&ir_init_data, 0, sizeof(struct IR_i2c_init_data)); | 119 | info.platform_data = &z8f0811_ir_init_data; |
114 | ir_init_data.ir_codes = &ir_codes_hauppauge_new_table; | ||
115 | ir_init_data.internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR; | ||
116 | ir_init_data.type = IR_TYPE_RC5; | ||
117 | ir_init_data.name = "CX23418 Z8F0811 Hauppauge"; | ||
118 | info.platform_data = &ir_init_data; | ||
119 | break; | 120 | break; |
120 | default: | 121 | default: |
121 | break; | 122 | break; |