From d61fe8084a38ef56fda1dc58eb71f4937de2d3da Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 14 Oct 2008 17:15:14 -0300 Subject: Input: Code cleanup - Access record handle directly instead of call sdp_data_get --- input/manager.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'input') diff --git a/input/manager.c b/input/manager.c index 25b64e4a..9bf9f8a8 100644 --- a/input/manager.c +++ b/input/manager.c @@ -59,9 +59,7 @@ static int hid_device_probe(struct btd_device *device, GSList *uuids) struct btd_adapter *adapter = device_get_adapter(device); const gchar *path = device_get_path(device); const sdp_record_t *rec = btd_device_get_record(device, uuids->data); - sdp_data_t *pdlist; bdaddr_t src, dst; - uint32_t handle; DBG("path %s", path); @@ -70,14 +68,9 @@ static int hid_device_probe(struct btd_device *device, GSList *uuids) adapter_get_address(adapter, &src); device_get_address(device, &dst); - pdlist = sdp_data_get(rec, SDP_SERVER_RECORD_HANDLE); - if (!pdlist) - return -1; - - handle = pdlist->val.uint32; return input_device_register(connection, path, &src, &dst, - HID_UUID, handle, idle_timeout * 60); + HID_UUID, rec->handle, idle_timeout * 60); } static void hid_device_remove(struct btd_device *device) -- cgit