diff options
author | Bastien Nocera <hadess@hadess.net> | 2012-09-07 13:01:58 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-09-07 15:22:22 +0300 |
commit | 7e5c32ae9624a4fe097cff648705fe8c75be552c (patch) | |
tree | ce7be1c965469e48598ddd6a88cd6a8e2198081f | |
parent | 51a51b8902642fa02ee8ac99e02428a9c28c846a (diff) |
input: Add helper function to request disconnect
-rw-r--r-- | profiles/input/device.c | 8 | ||||
-rw-r--r-- | profiles/input/device.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/profiles/input/device.c b/profiles/input/device.c index f1e1af0b..c42f137e 100644 --- a/profiles/input/device.c +++ b/profiles/input/device.c @@ -1308,3 +1308,11 @@ int input_device_close_channels(const bdaddr_t *src, const bdaddr_t *dst) return 0; } + +void input_device_request_disconnect(struct fake_input *fake) +{ + if (fake == NULL || fake->idev == NULL) + return; + + device_request_disconnect(fake->idev->device, NULL); +} diff --git a/profiles/input/device.h b/profiles/input/device.h index 509a3535..ff529677 100644 --- a/profiles/input/device.h +++ b/profiles/input/device.h @@ -49,3 +49,4 @@ int input_device_unregister(const char *path, const char *uuid); int input_device_set_channel(const bdaddr_t *src, const bdaddr_t *dst, int psm, GIOChannel *io); int input_device_close_channels(const bdaddr_t *src, const bdaddr_t *dst); +void input_device_request_disconnect(struct fake_input *fake); |