Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263271
b: refs/heads/master
c: 26af174
h: refs/heads/master
i:
  263269: 06253dd
  263267: 02540be
  263263: b0f9475
v: v3
  • Loading branch information
David Herrmann authored and Jiri Kosina committed Aug 23, 2011
1 parent 85b42c1 commit f6db90c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3989ef6cfb80825af2f7933415797f052817ac3e
refs/heads/master: 26af17484a737aaa991a7ce578cb15809a582fbc
16 changes: 16 additions & 0 deletions trunk/drivers/hid/hid-wiimote.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,20 @@ static int wiimote_input_event(struct input_dev *dev, unsigned int type,
return 0;
}

static int wiimote_input_open(struct input_dev *dev)
{
struct wiimote_data *wdata = input_get_drvdata(dev);

return hid_hw_open(wdata->hdev);
}

static void wiimote_input_close(struct input_dev *dev)
{
struct wiimote_data *wdata = input_get_drvdata(dev);

hid_hw_close(wdata->hdev);
}

static void handler_keys(struct wiimote_data *wdata, const __u8 *payload)
{
input_report_key(wdata->input, wiiproto_keymap[WIIPROTO_KEY_LEFT],
Expand Down Expand Up @@ -321,6 +335,8 @@ static struct wiimote_data *wiimote_create(struct hid_device *hdev)

input_set_drvdata(wdata->input, wdata);
wdata->input->event = wiimote_input_event;
wdata->input->open = wiimote_input_open;
wdata->input->close = wiimote_input_close;
wdata->input->dev.parent = &wdata->hdev->dev;
wdata->input->id.bustype = wdata->hdev->bus;
wdata->input->id.vendor = wdata->hdev->vendor;
Expand Down

0 comments on commit f6db90c

Please sign in to comment.