aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ir-kbd-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ir-kbd-i2c.c')
-rw-r--r--drivers/media/video/ir-kbd-i2c.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 124c502ea1f3..3cc1d6a6019b 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -40,6 +40,7 @@
40#include <linux/i2c.h> 40#include <linux/i2c.h>
41#include <linux/workqueue.h> 41#include <linux/workqueue.h>
42#include <asm/semaphore.h> 42#include <asm/semaphore.h>
43
43#include <media/ir-common.h> 44#include <media/ir-common.h>
44#include <media/ir-kbd-i2c.h> 45#include <media/ir-kbd-i2c.h>
45 46
@@ -277,9 +278,10 @@ static int ir_detach(struct i2c_client *client);
277static int ir_probe(struct i2c_adapter *adap); 278static int ir_probe(struct i2c_adapter *adap);
278 279
279static struct i2c_driver driver = { 280static struct i2c_driver driver = {
280 .name = "ir remote kbd driver", 281 .driver = {
281 .id = I2C_DRIVERID_I2C_IR, 282 .name = "ir remote kbd driver",
282 .flags = I2C_DF_NOTIFY, 283 },
284 .id = I2C_DRIVERID_INFRARED,
283 .attach_adapter = ir_probe, 285 .attach_adapter = ir_probe,
284 .detach_client = ir_detach, 286 .detach_client = ir_detach,
285}; 287};
@@ -296,15 +298,15 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
296 IR_KEYTAB_TYPE *ir_codes = NULL; 298 IR_KEYTAB_TYPE *ir_codes = NULL;
297 char *name; 299 char *name;
298 int ir_type; 300 int ir_type;
299 struct IR_i2c *ir; 301 struct IR_i2c *ir;
300 struct input_dev *input_dev; 302 struct input_dev *input_dev;
301 303
302 ir = kzalloc(sizeof(struct IR_i2c), GFP_KERNEL); 304 ir = kzalloc(sizeof(struct IR_i2c),GFP_KERNEL);
303 input_dev = input_allocate_device(); 305 input_dev = input_allocate_device();
304 if (!ir || !input_dev) { 306 if (!ir || !input_dev) {
305 kfree(ir); 307 kfree(ir);
306 input_free_device(input_dev); 308 input_free_device(input_dev);
307 return -ENOMEM; 309 return -ENOMEM;
308 } 310 }
309 311
310 ir->c = client_template; 312 ir->c = client_template;
@@ -360,7 +362,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
360 /* register i2c device 362 /* register i2c device
361 * At device register, IR codes may be changed to be 363 * At device register, IR codes may be changed to be
362 * board dependent. 364 * board dependent.
363 */ 365 */
364 i2c_attach_client(&ir->c); 366 i2c_attach_client(&ir->c);
365 367
366 /* If IR not supported or disabled, unregisters driver */ 368 /* If IR not supported or disabled, unregisters driver */