summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2011-09-02 13:34:56 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2011-09-12 11:40:49 +0200
commit68d25b8a5706b2682ff546dda3f62f28c7d25cf7 (patch)
tree065d577a7def14160a1315021f1e8227472876eb /src/device.c
parent968b95337f2c6cdfaf6447c417e8a7cac57ac565 (diff)
downloadconnman-68d25b8a5706b2682ff546dda3f62f28c7d25cf7.tar.gz
connman-68d25b8a5706b2682ff546dda3f62f28c7d25cf7.tar.bz2
connman-68d25b8a5706b2682ff546dda3f62f28c7d25cf7.zip
device: Simplify device_pending_reset()
The g_source for device_pending_reset() is going to be removed when the callback function returns FALSE. Thus simplify the code with a few lines.
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/device.c b/src/device.c
index a5b815f0..d8ab1fc0 100644
--- a/src/device.c
+++ b/src/device.c
@@ -221,11 +221,8 @@ static gboolean device_pending_reset(gpointer user_data)
DBG("device %p", device);
/* Power request timedout, reset power pending state. */
- if (device->pending_timeout > 0) {
- g_source_remove(device->pending_timeout);
- device->pending_timeout = 0;
- device->powered_pending = PENDING_NONE;
- }
+ device->pending_timeout = 0;
+ device->powered_pending = PENDING_NONE;
return FALSE;
}