@@ -59,8 +59,8 @@ module_param(debug, int, 0644); /* debug level (0,1,2) */
5959
6060/* ----------------------------------------------------------------------- */
6161
62- static int get_key_haup_common (struct IR_i2c * ir , enum rc_type * protocol ,
63- u32 * scancode , u8 * ptoggle , int size )
62+ static int get_key_haup_common (struct IR_i2c * ir , enum rc_proto * protocol ,
63+ u32 * scancode , u8 * ptoggle , int size )
6464{
6565 unsigned char buf [6 ];
6666 int start , range , toggle , dev , code , ircode , vendor ;
@@ -99,7 +99,7 @@ static int get_key_haup_common(struct IR_i2c *ir, enum rc_type *protocol,
9999 dprintk (1 , "ir hauppauge (rc5): s%d r%d t%d dev=%d code=%d\n" ,
100100 start , range , toggle , dev , code );
101101
102- * protocol = RC_TYPE_RC5 ;
102+ * protocol = RC_PROTO_RC5 ;
103103 * scancode = RC_SCANCODE_RC5 (dev , code );
104104 * ptoggle = toggle ;
105105
@@ -111,13 +111,13 @@ static int get_key_haup_common(struct IR_i2c *ir, enum rc_type *protocol,
111111
112112 if (vendor == 0x800f ) {
113113 * ptoggle = (dev & 0x80 ) != 0 ;
114- * protocol = RC_TYPE_RC6_MCE ;
114+ * protocol = RC_PROTO_RC6_MCE ;
115115 dev &= 0x7f ;
116116 dprintk (1 , "ir hauppauge (rc6-mce): t%d vendor=%d dev=%d code=%d\n" ,
117117 * ptoggle , vendor , dev , code );
118118 } else {
119119 * ptoggle = 0 ;
120- * protocol = RC_TYPE_RC6_6A_32 ;
120+ * protocol = RC_PROTO_RC6_6A_32 ;
121121 dprintk (1 , "ir hauppauge (rc6-6a-32): vendor=%d dev=%d code=%d\n" ,
122122 vendor , dev , code );
123123 }
@@ -130,13 +130,13 @@ static int get_key_haup_common(struct IR_i2c *ir, enum rc_type *protocol,
130130 return 0 ;
131131}
132132
133- static int get_key_haup (struct IR_i2c * ir , enum rc_type * protocol ,
133+ static int get_key_haup (struct IR_i2c * ir , enum rc_proto * protocol ,
134134 u32 * scancode , u8 * toggle )
135135{
136136 return get_key_haup_common (ir , protocol , scancode , toggle , 3 );
137137}
138138
139- static int get_key_haup_xvr (struct IR_i2c * ir , enum rc_type * protocol ,
139+ static int get_key_haup_xvr (struct IR_i2c * ir , enum rc_proto * protocol ,
140140 u32 * scancode , u8 * toggle )
141141{
142142 int ret ;
@@ -155,7 +155,7 @@ static int get_key_haup_xvr(struct IR_i2c *ir, enum rc_type *protocol,
155155 return get_key_haup_common (ir , protocol , scancode , toggle , 6 );
156156}
157157
158- static int get_key_pixelview (struct IR_i2c * ir , enum rc_type * protocol ,
158+ static int get_key_pixelview (struct IR_i2c * ir , enum rc_proto * protocol ,
159159 u32 * scancode , u8 * toggle )
160160{
161161 unsigned char b ;
@@ -166,13 +166,13 @@ static int get_key_pixelview(struct IR_i2c *ir, enum rc_type *protocol,
166166 return - EIO ;
167167 }
168168
169- * protocol = RC_TYPE_OTHER ;
169+ * protocol = RC_PROTO_OTHER ;
170170 * scancode = b ;
171171 * toggle = 0 ;
172172 return 1 ;
173173}
174174
175- static int get_key_fusionhdtv (struct IR_i2c * ir , enum rc_type * protocol ,
175+ static int get_key_fusionhdtv (struct IR_i2c * ir , enum rc_proto * protocol ,
176176 u32 * scancode , u8 * toggle )
177177{
178178 unsigned char buf [4 ];
@@ -191,13 +191,13 @@ static int get_key_fusionhdtv(struct IR_i2c *ir, enum rc_type *protocol,
191191 if (buf [0 ] != 0x1 || buf [1 ] != 0xfe )
192192 return 0 ;
193193
194- * protocol = RC_TYPE_UNKNOWN ;
194+ * protocol = RC_PROTO_UNKNOWN ;
195195 * scancode = buf [2 ];
196196 * toggle = 0 ;
197197 return 1 ;
198198}
199199
200- static int get_key_knc1 (struct IR_i2c * ir , enum rc_type * protocol ,
200+ static int get_key_knc1 (struct IR_i2c * ir , enum rc_proto * protocol ,
201201 u32 * scancode , u8 * toggle )
202202{
203203 unsigned char b ;
@@ -221,13 +221,13 @@ static int get_key_knc1(struct IR_i2c *ir, enum rc_type *protocol,
221221 /* keep old data */
222222 return 1 ;
223223
224- * protocol = RC_TYPE_UNKNOWN ;
224+ * protocol = RC_PROTO_UNKNOWN ;
225225 * scancode = b ;
226226 * toggle = 0 ;
227227 return 1 ;
228228}
229229
230- static int get_key_avermedia_cardbus (struct IR_i2c * ir , enum rc_type * protocol ,
230+ static int get_key_avermedia_cardbus (struct IR_i2c * ir , enum rc_proto * protocol ,
231231 u32 * scancode , u8 * toggle )
232232{
233233 unsigned char subaddr , key , keygroup ;
@@ -262,7 +262,7 @@ static int get_key_avermedia_cardbus(struct IR_i2c *ir, enum rc_type *protocol,
262262 }
263263 key |= (keygroup & 1 ) << 6 ;
264264
265- * protocol = RC_TYPE_UNKNOWN ;
265+ * protocol = RC_PROTO_UNKNOWN ;
266266 * scancode = key ;
267267 if (ir -> c -> addr == 0x41 ) /* AVerMedia EM78P153 */
268268 * scancode |= keygroup << 8 ;
@@ -274,7 +274,7 @@ static int get_key_avermedia_cardbus(struct IR_i2c *ir, enum rc_type *protocol,
274274
275275static int ir_key_poll (struct IR_i2c * ir )
276276{
277- enum rc_type protocol ;
277+ enum rc_proto protocol ;
278278 u32 scancode ;
279279 u8 toggle ;
280280 int rc ;
@@ -315,7 +315,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
315315{
316316 char * ir_codes = NULL ;
317317 const char * name = NULL ;
318- u64 rc_type = RC_BIT_UNKNOWN ;
318+ u64 rc_proto = RC_PROTO_BIT_UNKNOWN ;
319319 struct IR_i2c * ir ;
320320 struct rc_dev * rc = NULL ;
321321 struct i2c_adapter * adap = client -> adapter ;
@@ -334,46 +334,47 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
334334 case 0x64 :
335335 name = "Pixelview" ;
336336 ir -> get_key = get_key_pixelview ;
337- rc_type = RC_BIT_OTHER ;
337+ rc_proto = RC_PROTO_BIT_OTHER ;
338338 ir_codes = RC_MAP_EMPTY ;
339339 break ;
340340 case 0x18 :
341341 case 0x1f :
342342 case 0x1a :
343343 name = "Hauppauge" ;
344344 ir -> get_key = get_key_haup ;
345- rc_type = RC_BIT_RC5 ;
345+ rc_proto = RC_PROTO_BIT_RC5 ;
346346 ir_codes = RC_MAP_HAUPPAUGE ;
347347 break ;
348348 case 0x30 :
349349 name = "KNC One" ;
350350 ir -> get_key = get_key_knc1 ;
351- rc_type = RC_BIT_OTHER ;
351+ rc_proto = RC_PROTO_BIT_OTHER ;
352352 ir_codes = RC_MAP_EMPTY ;
353353 break ;
354354 case 0x6b :
355355 name = "FusionHDTV" ;
356356 ir -> get_key = get_key_fusionhdtv ;
357- rc_type = RC_BIT_UNKNOWN ;
357+ rc_proto = RC_PROTO_BIT_UNKNOWN ;
358358 ir_codes = RC_MAP_FUSIONHDTV_MCE ;
359359 break ;
360360 case 0x40 :
361361 name = "AVerMedia Cardbus remote" ;
362362 ir -> get_key = get_key_avermedia_cardbus ;
363- rc_type = RC_BIT_OTHER ;
363+ rc_proto = RC_PROTO_BIT_OTHER ;
364364 ir_codes = RC_MAP_AVERMEDIA_CARDBUS ;
365365 break ;
366366 case 0x41 :
367367 name = "AVerMedia EM78P153" ;
368368 ir -> get_key = get_key_avermedia_cardbus ;
369- rc_type = RC_BIT_OTHER ;
369+ rc_proto = RC_PROTO_BIT_OTHER ;
370370 /* RM-KV remote, seems to be same as RM-K6 */
371371 ir_codes = RC_MAP_AVERMEDIA_M733A_RM_K6 ;
372372 break ;
373373 case 0x71 :
374374 name = "Hauppauge/Zilog Z8" ;
375375 ir -> get_key = get_key_haup_xvr ;
376- rc_type = RC_BIT_RC5 | RC_BIT_RC6_MCE | RC_BIT_RC6_6A_32 ;
376+ rc_proto = RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC6_MCE |
377+ RC_PROTO_BIT_RC6_6A_32 ;
377378 ir_codes = RC_MAP_HAUPPAUGE ;
378379 break ;
379380 }
@@ -388,7 +389,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
388389
389390 name = init_data -> name ;
390391 if (init_data -> type )
391- rc_type = init_data -> type ;
392+ rc_proto = init_data -> type ;
392393
393394 if (init_data -> polling_interval )
394395 ir -> polling_interval = init_data -> polling_interval ;
@@ -431,7 +432,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
431432 ir -> rc = rc ;
432433
433434 /* Make sure we are all setup before going on */
434- if (!name || !ir -> get_key || !rc_type || !ir_codes ) {
435+ if (!name || !ir -> get_key || !rc_proto || !ir_codes ) {
435436 dprintk (1 , ": Unsupported device at address 0x%02x\n" ,
436437 addr );
437438 err = - ENODEV ;
@@ -458,8 +459,8 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
458459 * Initialize the other fields of rc_dev
459460 */
460461 rc -> map_name = ir -> ir_codes ;
461- rc -> allowed_protocols = rc_type ;
462- rc -> enabled_protocols = rc_type ;
462+ rc -> allowed_protocols = rc_proto ;
463+ rc -> enabled_protocols = rc_proto ;
463464 if (!rc -> driver_name )
464465 rc -> driver_name = MODULE_NAME ;
465466
0 commit comments