From 0e8c6c07c90a888e7ed7929baf0b649b14b12b34 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 8 Sep 2011 08:18:29 +0200 Subject: device: Remove device_probe and device_remove They're tiny and useless wrappers. --- src/device.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'src/device.c') diff --git a/src/device.c b/src/device.c index ec60449c..28ecfbde 100644 --- a/src/device.c +++ b/src/device.c @@ -1063,7 +1063,13 @@ static gboolean match_driver(struct connman_device *device, return FALSE; } -static int device_probe(struct connman_device *device) +/** + * connman_device_register: + * @device: device structure + * + * Register device with the system + */ +int connman_device_register(struct connman_device *device) { GSList *list; @@ -1092,27 +1098,6 @@ static int device_probe(struct connman_device *device) return __connman_technology_add_device(device); } -static void device_remove(struct connman_device *device) -{ - DBG("device %p name %s", device, device->name); - - if (device->driver == NULL) - return; - - remove_device(device); -} - -/** - * connman_device_register: - * @device: device structure - * - * Register device with the system - */ -int connman_device_register(struct connman_device *device) -{ - return device_probe(device); -} - /** * connman_device_unregister: * @device: device structure @@ -1121,7 +1106,12 @@ int connman_device_register(struct connman_device *device) */ void connman_device_unregister(struct connman_device *device) { - device_remove(device); + DBG("device %p name %s", device, device->name); + + if (device->driver == NULL) + return; + + remove_device(device); } /** -- cgit v1.2.3