[Bluetooth] Add open and close callbacks for HID device
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 17 Feb 2007 22:58:53 +0000 (23:58 +0100)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 26 Feb 2007 19:42:39 +0000 (11:42 -0800)
The open and close callbacks for the HID device are not optional, but
for the Bluetooth HID report mode support it is enough to add empty
dummy callbacks.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hidp/core.c

index 05e23bbcb0a1296455a0531ef47910f1e1bb9c7e..4c914df5fd06aa479fbeca16a3b98becc6fda939 100644 (file)
@@ -670,6 +670,15 @@ static inline void hidp_setup_input(struct hidp_session *session, struct hidp_co
        input_register_device(input);
 }
 
+static int hidp_open(struct hid_device *hid)
+{
+       return 0;
+}
+
+static void hidp_close(struct hid_device *hid)
+{
+}
+
 static inline void hidp_setup_hid(struct hidp_session *session, struct hidp_connadd_req *req)
 {
        struct hid_device *hid = session->hid;
@@ -694,6 +703,9 @@ static inline void hidp_setup_hid(struct hidp_session *session, struct hidp_conn
 
        hid->dev = hidp_get_device(session);
 
+       hid->hid_open  = hidp_open;
+       hid->hid_close = hidp_close;
+
        hid->hidinput_input_event = hidp_hidinput_event;
 
        list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].report_list, list)