diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-05-13 15:48:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:21:11 -0400 |
commit | 1df8e9861cf9fac5737ccb61c7f7fefa77711d40 (patch) | |
tree | bacc30f912a50aeff07f869f610e76845bd1d148 /drivers/media/video/ir-kbd-i2c.c | |
parent | 24c44d85114098a013dd5fed084fb27ad803f000 (diff) |
V4L/DVB (11843): ir-kbd-i2c: Don't use i2c_client.name for our own needs
In the standard device driver binding model, the name field of
struct i2c_client is used to match devices to their drivers, so we
must stop using it for internal purposes. Define a separate field
in struct IR_i2c as a replacement, and use it.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ir-kbd-i2c.c')
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 092c7da0f37a..ba341e6fb2da 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -337,6 +337,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr, | |||
337 | 337 | ||
338 | ir->c.adapter = adap; | 338 | ir->c.adapter = adap; |
339 | ir->c.addr = addr; | 339 | ir->c.addr = addr; |
340 | snprintf(ir->c.name, sizeof(ir->c.name), "ir-kbd"); | ||
340 | 341 | ||
341 | i2c_set_clientdata(&ir->c, ir); | 342 | i2c_set_clientdata(&ir->c, ir); |
342 | 343 | ||
@@ -410,7 +411,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr, | |||
410 | } | 411 | } |
411 | 412 | ||
412 | /* Sets name */ | 413 | /* Sets name */ |
413 | snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (%s)", name); | 414 | snprintf(ir->name, sizeof(ir->name), "i2c IR (%s)", name); |
414 | ir->ir_codes = ir_codes; | 415 | ir->ir_codes = ir_codes; |
415 | 416 | ||
416 | /* register i2c device | 417 | /* register i2c device |
@@ -435,7 +436,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr, | |||
435 | /* init + register input device */ | 436 | /* init + register input device */ |
436 | ir_input_init(input_dev, &ir->ir, ir_type, ir->ir_codes); | 437 | ir_input_init(input_dev, &ir->ir, ir_type, ir->ir_codes); |
437 | input_dev->id.bustype = BUS_I2C; | 438 | input_dev->id.bustype = BUS_I2C; |
438 | input_dev->name = ir->c.name; | 439 | input_dev->name = ir->name; |
439 | input_dev->phys = ir->phys; | 440 | input_dev->phys = ir->phys; |
440 | 441 | ||
441 | err = input_register_device(ir->input); | 442 | err = input_register_device(ir->input); |