diff options
Diffstat (limited to 'drivers/hid/hid-alps.c')
-rw-r--r-- | drivers/hid/hid-alps.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index aec253b44156..3cd7229b6e54 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c | |||
@@ -660,6 +660,20 @@ exit: | |||
660 | return ret; | 660 | return ret; |
661 | } | 661 | } |
662 | 662 | ||
663 | static int alps_sp_open(struct input_dev *dev) | ||
664 | { | ||
665 | struct hid_device *hid = input_get_drvdata(dev); | ||
666 | |||
667 | return hid_hw_open(hid); | ||
668 | } | ||
669 | |||
670 | static void alps_sp_close(struct input_dev *dev) | ||
671 | { | ||
672 | struct hid_device *hid = input_get_drvdata(dev); | ||
673 | |||
674 | hid_hw_close(hid); | ||
675 | } | ||
676 | |||
663 | static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi) | 677 | static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi) |
664 | { | 678 | { |
665 | struct alps_dev *data = hid_get_drvdata(hdev); | 679 | struct alps_dev *data = hid_get_drvdata(hdev); |
@@ -733,6 +747,10 @@ static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi) | |||
733 | input2->id.version = input->id.version; | 747 | input2->id.version = input->id.version; |
734 | input2->dev.parent = input->dev.parent; | 748 | input2->dev.parent = input->dev.parent; |
735 | 749 | ||
750 | input_set_drvdata(input2, hdev); | ||
751 | input2->open = alps_sp_open; | ||
752 | input2->close = alps_sp_close; | ||
753 | |||
736 | __set_bit(EV_KEY, input2->evbit); | 754 | __set_bit(EV_KEY, input2->evbit); |
737 | data->sp_btn_cnt = (data->sp_btn_info & 0x0F); | 755 | data->sp_btn_cnt = (data->sp_btn_info & 0x0F); |
738 | for (i = 0; i < data->sp_btn_cnt; i++) | 756 | for (i = 0; i < data->sp_btn_cnt; i++) |