HID: qvr: Remove device pointer on disconnect

Make local device pointer NULL when .remove is
invoked.

Change-Id: I5bf91367b633abf79cbc60ef5bdf93cca955902c
Signed-off-by: rbandi <rohitbandi@codeaurora.org>
This commit is contained in:
rbandi 2020-12-07 07:50:42 -08:00
commit e84d2834a2

View file

@ -632,6 +632,9 @@ static int qvr_external_sensor_raw_event(struct hid_device *hid,
static void qvr_external_sensor_device_remove(struct hid_device *hdev)
{
struct qvr_external_sensor *sensor = &qvr_external_sensor;
sensor->device = NULL;
hid_hw_stop(hdev);
}