[PATCH evemu 8/7] Drop file descriptor from evemu_destroy()
Peter Hutterer
peter.hutterer at who-t.net
Thu Nov 21 17:49:22 PST 2013
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Could probably be squashed in somewhere but libevdev keeps track of the fd,
so we don't really need it here. and we've already broken the API anyway...
src/evemu.c | 4 ++--
src/evemu.h | 4 ++--
tools/evemu-device.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/evemu.c b/src/evemu.c
index 39d66f9..f90d46e 100644
--- a/src/evemu.c
+++ b/src/evemu.c
@@ -135,7 +135,7 @@ struct evemu_device *evemu_new(const char *name)
void evemu_delete(struct evemu_device *dev)
{
if (dev->uidev)
- evemu_destroy(dev, libevdev_uinput_get_fd(dev->uidev));
+ evemu_destroy(dev);
libevdev_free(dev->evdev);
free(dev);
}
@@ -777,7 +777,7 @@ int evemu_create(struct evemu_device *dev, int fd)
return libevdev_uinput_create_from_device(dev->evdev, fd, &dev->uidev);
}
-void evemu_destroy(struct evemu_device *dev, int fd)
+void evemu_destroy(struct evemu_device *dev)
{
if (dev->uidev) {
libevdev_uinput_destroy(dev->uidev);
diff --git a/src/evemu.h b/src/evemu.h
index e46000d..f438367 100644
--- a/src/evemu.h
+++ b/src/evemu.h
@@ -422,11 +422,11 @@ int evemu_create(struct evemu_device *dev, int fd);
/**
* evemu_destroy() - destroy all created kernel devices
- * @fd: file descriptor of the special kernel uinput device
+ * @dev: the device to destroy
*
* Destroys all devices created using this file descriptor.
*/
-void evemu_destroy(struct evemu_device *dev, int fd);
+void evemu_destroy(struct evemu_device *dev);
#ifdef __cplusplus
}
diff --git a/tools/evemu-device.c b/tools/evemu-device.c
index 768dd3d..ae82578 100644
--- a/tools/evemu-device.c
+++ b/tools/evemu-device.c
@@ -225,7 +225,7 @@ static int evemu_device(FILE *fp)
if (ret < 0)
goto out_close;
hold_device(dev);
- evemu_destroy(dev, fd);
+ evemu_destroy(dev);
out_close:
close(fd);
--
1.8.3.1
More information about the Input-tools
mailing list