Commit b22b7104 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: hid: Don't disable connection-tx before destroying hid-device

hid_destroy_device() can potentially call callbacks defined in struct
hid_ll_driver, which may initiate few greybus operations.

And so connection (tx) should be kept enabled until the hid-device isn't
destroyed.
Reported-by: default avatarJiss Kuruvila <jkuruvila@google.com>
Reported-by: default avatarLaurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 4a8e5199
......@@ -490,8 +490,8 @@ static void gb_hid_disconnect(struct gb_bundle *bundle)
{
struct gb_hid *ghid = greybus_get_drvdata(bundle);
gb_connection_disable(ghid->connection);
hid_destroy_device(ghid->hid);
gb_connection_disable(ghid->connection);
gb_connection_destroy(ghid->connection);
kfree(ghid);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment