Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5ffd462 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by David S. Miller
Browse files

[Bluetooth] Add open and close callbacks for HID device



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: default avatarMarcel Holtmann <marcel@holtmann.org>
parent e1aaadd4
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -670,6 +670,15 @@ static inline void hidp_setup_input(struct hidp_session *session, struct hidp_co
	input_register_device(input);
	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)
static inline void hidp_setup_hid(struct hidp_session *session, struct hidp_connadd_req *req)
{
{
	struct hid_device *hid = session->hid;
	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->dev = hidp_get_device(session);


	hid->hid_open  = hidp_open;
	hid->hid_close = hidp_close;

	hid->hidinput_input_event = hidp_hidinput_event;
	hid->hidinput_input_event = hidp_hidinput_event;


	list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].report_list, list)
	list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].report_list, list)