summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-wiimote-ext.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-05-05 23:12:47 +0200
committerJiri Kosina <jkosina@suse.cz>2013-06-03 11:06:59 +0200
commit5682b1a8690cfae5ad3bd40a123510fd4014066d (patch)
treece50800b45fe858ea45d3d9aab8780c8e3405b07 /drivers/hid/hid-wiimote-ext.c
parent139385383267de547f5dbdbd2049d3a9c996c85e (diff)
HID: wiimote: keep HID device open
We need constant I/O to keep the state up-to-date and not miss any packets. Hence, call hid_hw_open() during setup and hid_hw_close() during destruction. These are no-ops for Bluetooth HIDP, but lets be safe. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wiimote-ext.c')
-rw-r--r--drivers/hid/hid-wiimote-ext.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/hid/hid-wiimote-ext.c b/drivers/hid/hid-wiimote-ext.c
index 1c104fca4199..267c89c46d3e 100644
--- a/drivers/hid/hid-wiimote-ext.c
+++ b/drivers/hid/hid-wiimote-ext.c
@@ -661,11 +661,6 @@ static DEVICE_ATTR(extension, S_IRUGO, wiiext_show, NULL);
static int wiiext_input_open(struct input_dev *dev)
{
struct wiimote_ext *ext = input_get_drvdata(dev);
- int ret;
-
- ret = hid_hw_open(ext->wdata->hdev);
- if (ret)
- return ret;
atomic_inc(&ext->opened);
wiiext_schedule(ext);
@@ -679,17 +674,11 @@ static void wiiext_input_close(struct input_dev *dev)
atomic_dec(&ext->opened);
wiiext_schedule(ext);
- hid_hw_close(ext->wdata->hdev);
}
static int wiiext_mp_open(struct input_dev *dev)
{
struct wiimote_ext *ext = input_get_drvdata(dev);
- int ret;
-
- ret = hid_hw_open(ext->wdata->hdev);
- if (ret)
- return ret;
atomic_inc(&ext->mp_opened);
wiiext_schedule(ext);
@@ -703,7 +692,6 @@ static void wiiext_mp_close(struct input_dev *dev)
atomic_dec(&ext->mp_opened);
wiiext_schedule(ext);
- hid_hw_close(ext->wdata->hdev);
}
/* Initializes the extension driver of a wiimote */