diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-09-23 00:23:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:06:07 -0400 |
commit | c72ba8e6ae7376d20e509a9a54a2dd45fb483fc2 (patch) | |
tree | 4f2b407b086309b411e7d7ea80c2a0a71ac604d9 /drivers/media/video/ir-kbd-i2c.c | |
parent | 44243fc2ef99948bc9b046901880885616dd5e89 (diff) |
V4L/DVB: saa7134: get rid of I2C_HW_SAA7134
The only reason for keeping I2C_HW_SAA7134 is to allow setting a
per-device polling interval. Just move this info to the platform
data, allowing drivers to change it per device, where needed.
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 | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 91b2c88d4d72..5a000c65ae98 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -259,15 +259,9 @@ static void ir_key_poll(struct IR_i2c *ir) | |||
259 | static void ir_work(struct work_struct *work) | 259 | static void ir_work(struct work_struct *work) |
260 | { | 260 | { |
261 | struct IR_i2c *ir = container_of(work, struct IR_i2c, work.work); | 261 | struct IR_i2c *ir = container_of(work, struct IR_i2c, work.work); |
262 | int polling_interval = 100; | ||
263 | |||
264 | /* MSI TV@nywhere Plus requires more frequent polling | ||
265 | otherwise it will miss some keypresses */ | ||
266 | if (ir->c->adapter->id == I2C_HW_SAA7134 && ir->c->addr == 0x30) | ||
267 | polling_interval = 50; | ||
268 | 262 | ||
269 | ir_key_poll(ir); | 263 | ir_key_poll(ir); |
270 | schedule_delayed_work(&ir->work, msecs_to_jiffies(polling_interval)); | 264 | schedule_delayed_work(&ir->work, msecs_to_jiffies(ir->polling_interval)); |
271 | } | 265 | } |
272 | 266 | ||
273 | /* ----------------------------------------------------------------------- */ | 267 | /* ----------------------------------------------------------------------- */ |
@@ -292,6 +286,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
292 | 286 | ||
293 | ir->c = client; | 287 | ir->c = client; |
294 | ir->input = input_dev; | 288 | ir->input = input_dev; |
289 | ir->polling_interval = DEFAULT_POLLING_INTERVAL; | ||
295 | i2c_set_clientdata(client, ir); | 290 | i2c_set_clientdata(client, ir); |
296 | 291 | ||
297 | switch(addr) { | 292 | switch(addr) { |
@@ -343,6 +338,9 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
343 | if (init_data->type) | 338 | if (init_data->type) |
344 | ir_type = init_data->type; | 339 | ir_type = init_data->type; |
345 | 340 | ||
341 | if (init_data->polling_interval) | ||
342 | ir->polling_interval = init_data->polling_interval; | ||
343 | |||
346 | switch (init_data->internal_get_key_func) { | 344 | switch (init_data->internal_get_key_func) { |
347 | case IR_KBD_GET_KEY_CUSTOM: | 345 | case IR_KBD_GET_KEY_CUSTOM: |
348 | /* The bridge driver provided us its own function */ | 346 | /* The bridge driver provided us its own function */ |