Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219488
b: refs/heads/master
c: 17c2b1f
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Oct 22, 2010
1 parent ee7c4a2 commit 84f21dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37dbd3a64ed6dd62ab5a49dbfcfae7e8ac0413a9
refs/heads/master: 17c2b1fd71f75a50284a33af9bc0d98ed1cbcd30
17 changes: 12 additions & 5 deletions trunk/drivers/media/IR/mceusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ struct mceusb_model {
u32 tx_mask_inverted:1;
u32 is_polaris:1;

/*
* Allow specify a per-board extra data, like
* device names, and per-device rc_maps
*/
const char *rc_map; /* Allow specify a per-board map */
};

static const struct mceusb_model mceusb_model[] = {
Expand All @@ -147,6 +144,12 @@ static const struct mceusb_model mceusb_model[] = {
},
[POLARIS_EVK] = {
.is_polaris = 1,
/*
* In fact, the EVK is shipped without
* remotes, but we should have something handy,
* to allow testing it
*/
.rc_map = RC_MAP_RC5_HAUPPAUGE_NEW,
},
};

Expand Down Expand Up @@ -951,6 +954,7 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)
struct input_dev *idev;
struct ir_dev_props *props;
struct device *dev = ir->dev;
const char *rc_map = RC_MAP_RC6_MCE;
int ret = -ENODEV;

idev = input_allocate_device();
Expand Down Expand Up @@ -985,7 +989,10 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)

ir->props = props;

ret = ir_input_register(idev, RC_MAP_RC6_MCE, props, DRIVER_NAME);
if (mceusb_model[ir->model].rc_map)
rc_map = mceusb_model[ir->model].rc_map;

ret = ir_input_register(idev, rc_map, props, DRIVER_NAME);
if (ret < 0) {
dev_err(dev, "remote input device register failed\n");
goto irdev_failed;
Expand Down

0 comments on commit 84f21dd

Please sign in to comment.