Fix wrong API usage in HID-Device 12/139512/1
authorNagaraj D R <nagaraj.dr@samsung.com>
Wed, 19 Jul 2017 07:40:39 +0000 (13:10 +0530)
committerNagaraj D R <nagaraj.dr@samsung.com>
Wed, 19 Jul 2017 07:43:46 +0000 (13:13 +0530)
Wrongly "find_device()" is used to find the device
connected with HID-Device role.

Replaced "find_device()" with "find_device_role" api call

Change-Id: If6bed298b351e17c0973087d09f0d18726f04308

profiles/input/device.c

index c84445a..b10d82d 100644 (file)
@@ -1677,7 +1677,7 @@ int input_device_role_set_channel(const bdaddr_t *src, const bdaddr_t *dst, int
 
 int input_device_role_close_channels(const bdaddr_t *src, const bdaddr_t *dst)
 {
-       struct input_device *idev = find_device(src, dst);
+       struct input_device *idev = find_device_role(src, dst);
 
        if (!idev)
                return -ENOENT;