diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2008-06-18 15:58:32 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2008-06-18 15:58:32 +0000 | 
| commit | dde6ea8284f922181318ee84fd58144e06ee39b2 (patch) | |
| tree | ff908546fd76fb68f38d43bd24d56a6e4a787881 | |
| parent | 407a723fbd995760217d837d6bca7d6049d1fdbf (diff) | |
Fix driver comparison
| -rw-r--r-- | hcid/device.c | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/hcid/device.c b/hcid/device.c index 7049a223..6736bb54 100644 --- a/hcid/device.c +++ b/hcid/device.c @@ -1252,6 +1252,13 @@ gint device_address_cmp(struct device *device, const gchar *address)  	return strcasecmp(device->address, address);  } +static int cmp_by_name(const void *data, const void *user_data) +{ +	const struct btd_device_driver *dev_driver = data, *driver = user_data; + +	return (strcmp(dev_driver->name, driver->name)); +} +  void device_probe_drivers(struct device *device)  {  	GSList *list; @@ -1274,7 +1281,8 @@ void device_probe_drivers(struct device *device)  		}  		if (do_probe == TRUE && !g_slist_find_custom(device->drivers, -					driver, (GCompareFunc) strcmp)) { +					driver, (GCompareFunc) cmp_by_name)) { +  			err = driver->probe(&device->dev);  			if (err < 0) {  				error("probe failed for driver %s", | 
