diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-11 15:28:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:06:47 -0500 |
commit | 0f1c8232e839e215e38055cd8ae79225ab178185 (patch) | |
tree | d83d1f6f9805918b982fef18e5d9fcc2a9326191 /drivers | |
parent | 301eacbf30e33f461701df91cb250d3fc24c5fe5 (diff) |
libertas: remove casts from lbs_cmd() and lbs_cmd_with_response() macros
If stupid people like me give it arguments with the wrong type (like a
pointer to the structure, for example, instead of the structure itself),
then we should probably notice that at compile time. Otherwise, much
confusion ensues.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/cmd.h b/drivers/net/wireless/libertas/cmd.h index 716f25be5b3e..950acce3baaf 100644 --- a/drivers/net/wireless/libertas/cmd.h +++ b/drivers/net/wireless/libertas/cmd.h | |||
@@ -7,11 +7,11 @@ | |||
7 | #include "dev.h" | 7 | #include "dev.h" |
8 | 8 | ||
9 | #define lbs_cmd(priv, cmdnr, cmd, callback, callback_arg) \ | 9 | #define lbs_cmd(priv, cmdnr, cmd, callback, callback_arg) \ |
10 | __lbs_cmd(priv, cmdnr, (struct cmd_header *) &cmd, sizeof(cmd), \ | 10 | __lbs_cmd(priv, cmdnr, &(cmd).hdr, sizeof(cmd), \ |
11 | callback, callback_arg) | 11 | callback, callback_arg) |
12 | 12 | ||
13 | #define lbs_cmd_with_response(priv, cmdnr, cmd) \ | 13 | #define lbs_cmd_with_response(priv, cmdnr, cmd) \ |
14 | __lbs_cmd(priv, cmdnr, (struct cmd_header *) &cmd, sizeof(cmd), \ | 14 | __lbs_cmd(priv, cmdnr, &(cmd).hdr, sizeof(cmd), \ |
15 | lbs_cmd_copyback, (unsigned long) &cmd) | 15 | lbs_cmd_copyback, (unsigned long) &cmd) |
16 | 16 | ||
17 | int __lbs_cmd(struct lbs_private *priv, uint16_t command, | 17 | int __lbs_cmd(struct lbs_private *priv, uint16_t command, |