From 548026e08bd9b83b3685d515a916e2cf674184f3 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 9 Oct 2008 14:11:16 +0200 Subject: Make device driver probe calls take UUID's instead of full records This is preparation for allowing the device object to be correctly set up even when we don't have the full service records but only the remote UUID's. --- input/manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'input') diff --git a/input/manager.c b/input/manager.c index 9e548369..51634e3d 100644 --- a/input/manager.c +++ b/input/manager.c @@ -54,11 +54,11 @@ static void input_remove(struct btd_device *device, const char *uuid) input_device_unregister(path, uuid); } -static int hid_device_probe(struct btd_device *device, GSList *records) +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); - sdp_record_t *rec = records->data; + const sdp_record_t *rec = btd_device_get_record(device, uuids->data); sdp_data_t *pdlist; bdaddr_t src, dst; uint32_t handle; @@ -82,18 +82,18 @@ static void hid_device_remove(struct btd_device *device) input_remove(device, HID_UUID); } -static int headset_probe(struct btd_device *device, GSList *records) +static int headset_probe(struct btd_device *device, GSList *uuids) { struct btd_adapter *adapter = device_get_adapter(device); const gchar *path = device_get_path(device); - sdp_record_t *record = records->data; + const sdp_record_t *record = btd_device_get_record(device, uuids->data); sdp_list_t *protos; uint8_t ch; bdaddr_t src, dst; DBG("path %s", path); - if (sdp_get_access_protos(record, &protos) < 0) { + if (!record || sdp_get_access_protos(record, &protos) < 0) { error("Invalid record"); return -EINVAL; } -- cgit