summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-09-08 08:18:29 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-09-12 12:06:01 +0200
commit0e8c6c07c90a888e7ed7929baf0b649b14b12b34 (patch)
tree6a2e6834025443d7c8368b2f3905711001f90b19 /src/device.c
parent415f6cd5afdbfbd87e508026a2b04b744c997548 (diff)
downloadconnman-0e8c6c07c90a888e7ed7929baf0b649b14b12b34.tar.gz
connman-0e8c6c07c90a888e7ed7929baf0b649b14b12b34.tar.bz2
connman-0e8c6c07c90a888e7ed7929baf0b649b14b12b34.zip
device: Remove device_probe and device_remove
They're tiny and useless wrappers.
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c36
1 files changed, 13 insertions, 23 deletions
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);
}
/**