summaryrefslogtreecommitdiff
path: root/src/login/logind-device.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-08 18:11:09 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-08 18:12:45 +0100
commit9588bc32096fc8342bfd8b989689717186d7d86e (patch)
tree774cf93f0544add18f8307714062cc18f97838da /src/login/logind-device.c
parentf842cd74eacc2960ac849766eb786059317415ee (diff)
Remove dead code and unexport some calls
"make check-api-unused" informs us about code that is not used anymore or that is exported but only used internally. Fix these all over the place.
Diffstat (limited to 'src/login/logind-device.c')
-rw-r--r--src/login/logind-device.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/login/logind-device.c b/src/login/logind-device.c
index c5fe92bd60..76c5a5c88f 100644
--- a/src/login/logind-device.c
+++ b/src/login/logind-device.c
@@ -54,18 +54,7 @@ Device* device_new(Manager *m, const char *sysfs, bool master) {
return d;
}
-void device_free(Device *d) {
- assert(d);
-
- device_detach(d);
-
- hashmap_remove(d->manager->devices, d->sysfs);
-
- free(d->sysfs);
- free(d);
-}
-
-void device_detach(Device *d) {
+static void device_detach(Device *d) {
Seat *s;
SessionDevice *sd;
@@ -87,6 +76,17 @@ void device_detach(Device *d) {
}
}
+void device_free(Device *d) {
+ assert(d);
+
+ device_detach(d);
+
+ hashmap_remove(d->manager->devices, d->sysfs);
+
+ free(d->sysfs);
+ free(d);
+}
+
void device_attach(Device *d, Seat *s) {
Device *i;
bool had_master;