[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/6] libmachdev: remove mach_device_deallocate
From: |
Justus Winter |
Subject: |
[PATCH 2/6] libmachdev: remove mach_device_deallocate |
Date: |
Sun, 13 Apr 2014 13:43:10 +0200 |
mach_device_deallocate just called ports_port_deref. However, the
reference counting is done by the translation functions, explicitly
reducing the reference count is just wrong.
* libmachdev/ds_routines.c (mach_device_deallocate): Remove now unused
function.
(ds_device_close): Drop spurious call to mach_device_deallocate.
---
libmachdev/ds_routines.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
index 44f1139..2f9388a 100644
--- a/libmachdev/ds_routines.c
+++ b/libmachdev/ds_routines.c
@@ -82,12 +82,6 @@ static int num_emul;
boolean_t is_master_device (mach_port_t port);
-static inline void
-mach_device_deallocate (void *device)
-{
- ports_port_deref (device);
-}
-
/*
* What follows is the interface for the native Mach devices.
*/
@@ -180,7 +174,6 @@ ds_device_close (struct mach_device *device)
ret = (device->dev.emul_ops->close
? (*device->dev.emul_ops->close) (device->dev.emul_data)
: D_SUCCESS);
- mach_device_deallocate (device);
return ret;
}
--
1.9.1
- more dde fixes, Justus Winter, 2014/04/13
- [PATCH 1/6] libmachdev: fix device_open, Justus Winter, 2014/04/13
- [PATCH 2/6] libmachdev: remove mach_device_deallocate,
Justus Winter <=
- [PATCH 3/6] libmachdev: make the two port buckets clearly distinct, Justus Winter, 2014/04/13
- [PATCH 4/6] libmachdev: drop unused declarations, Justus Winter, 2014/04/13
- [PATCH 6/6] libmachdev: add, fix and use declaration for create_device_port, Justus Winter, 2014/04/13
- [PATCH 5/6] libmachdev: add missing includes, Justus Winter, 2014/04/13