V4L/DVB (11845): ir-kbd-i2c: Use initialization data

For specific boards, pass initialization data to ir-kbd-i2c instead
of modifying the settings after the device is initialized. This is
more efficient and easier to read.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Jean Delvare
2009-05-13 16:49:32 -03:00
committed by Mauro Carvalho Chehab
parent c668f32dca
commit 4d7a2d6721
11 changed files with 83 additions and 154 deletions

View File

@@ -19,4 +19,11 @@ struct IR_i2c {
char phys[32];
int (*get_key)(struct IR_i2c*, u32*, u32*);
};
/* Can be passed when instantiating an ir_video i2c device */
struct IR_i2c_init_data {
IR_KEYTAB_TYPE *ir_codes;
const char *name;
int (*get_key)(struct IR_i2c*, u32*, u32*);
};
#endif