diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-09 14:11:16 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-09 15:13:28 +0200 |
commit | 548026e08bd9b83b3685d515a916e2cf674184f3 (patch) | |
tree | 75f707ae2a4b825ae7f60cef44f54a74579e21a0 /input/manager.c | |
parent | 99c24bafe1619e6ace7e89be2ddea2e8f2eaf98f (diff) |
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.
Diffstat (limited to 'input/manager.c')
-rw-r--r-- | input/manager.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |