Thread (5 messages) flat view 5 messages, 2 authors, 2011-03-23

Re: [PATCH] Remove unused fields in btd_driver_data struct

From: Claudio Takahasi <hidden>
Date: 2011-03-22 21:36:35

Hi Johan,

On Tue, Mar 22, 2011 at 9:10 PM, Johan Hedberg [off-list ref] wrote:
Hi Claudio,

On Tue, Mar 22, 2011, Claudio Takahasi wrote:
quoted
---
 src/device.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index e9d9e65..5121064 100644
--- a/src/device.c
+++ b/src/device.c
@@ -68,9 +68,7 @@
 #define GLOBAL_TRUST "[all]"

 struct btd_driver_data {
-     guint id;
      struct btd_device_driver *driver;
-     void *priv;
 };
Why is btd_driver_data needed at all if btd_device_driver is the only
thing that it contains (i.e. why can't places pointing to
btd_driver_data just point to btd_device_driver directly)?

Johan
I did a quick look in the code, we can point directly to the
btd_device_driver and remove the btd_driver_data struct.
This structure was added by the commit b76fbc7d in 2008, I don't think
that there is a plan to use it :-)
"*priv" was never used and "guint id;" seems to be added by mistake.

Please ignore this patch, I will send another patch removing
btd_driver_data struct.

Claudio.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help