HID: add hid_hw_open/close/power() handlers

Instead of exposing the guts of hid->ll_driver relationship to HID
sub-drivers provide these helpers to encapsulate the details.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Dmitry Torokhov
2010-12-07 23:02:48 -08:00
committed by Jiri Kosina
parent 33d6eb570b
commit 5bea7660bb
5 changed files with 68 additions and 34 deletions

View File

@@ -772,14 +772,14 @@ static int hidinput_open(struct input_dev *dev)
{
struct hid_device *hid = input_get_drvdata(dev);
return hid->ll_driver->open(hid);
return hid_hw_open(hid);
}
static void hidinput_close(struct input_dev *dev)
{
struct hid_device *hid = input_get_drvdata(dev);
hid->ll_driver->close(hid);
hid_hw_close(hid);
}
/*