diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2011-03-22 08:12:19 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-03-31 13:22:56 -0400 |
commit | c68fb7ff29622a7db8264f939f94e37330c27080 (patch) | |
tree | d9589c03ad6990c42957c3603693ff252f59bddf /net/bluetooth/mgmt.c | |
parent | e0e185efbad442a659657c152a9cd9b3fdcb43f2 (diff) |
Bluetooth: Rename cmd to param in pending_cmd
This field holds not whole command but only command specific
parameters.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index f7ce78235590..d0c01230bba9 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -36,7 +36,7 @@ struct pending_cmd { | |||
36 | struct list_head list; | 36 | struct list_head list; |
37 | __u16 opcode; | 37 | __u16 opcode; |
38 | int index; | 38 | int index; |
39 | void *cmd; | 39 | void *param; |
40 | struct sock *sk; | 40 | struct sock *sk; |
41 | void *user_data; | 41 | void *user_data; |
42 | }; | 42 | }; |
@@ -217,7 +217,7 @@ static int read_controller_info(struct sock *sk, u16 index) | |||
217 | static void mgmt_pending_free(struct pending_cmd *cmd) | 217 | static void mgmt_pending_free(struct pending_cmd *cmd) |
218 | { | 218 | { |
219 | sock_put(cmd->sk); | 219 | sock_put(cmd->sk); |
220 | kfree(cmd->cmd); | 220 | kfree(cmd->param); |
221 | kfree(cmd); | 221 | kfree(cmd); |
222 | } | 222 | } |
223 | 223 | ||
@@ -233,13 +233,13 @@ static struct pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode, | |||
233 | cmd->opcode = opcode; | 233 | cmd->opcode = opcode; |
234 | cmd->index = index; | 234 | cmd->index = index; |
235 | 235 | ||
236 | cmd->cmd = kmalloc(len, GFP_ATOMIC); | 236 | cmd->param = kmalloc(len, GFP_ATOMIC); |
237 | if (!cmd->cmd) { | 237 | if (!cmd->param) { |
238 | kfree(cmd); | 238 | kfree(cmd); |
239 | return NULL; | 239 | return NULL; |
240 | } | 240 | } |
241 | 241 | ||
242 | memcpy(cmd->cmd, data, len); | 242 | memcpy(cmd->param, data, len); |
243 | 243 | ||
244 | cmd->sk = sk; | 244 | cmd->sk = sk; |
245 | sock_hold(sk); | 245 | sock_hold(sk); |
@@ -1426,7 +1426,7 @@ struct cmd_lookup { | |||
1426 | 1426 | ||
1427 | static void mode_rsp(struct pending_cmd *cmd, void *data) | 1427 | static void mode_rsp(struct pending_cmd *cmd, void *data) |
1428 | { | 1428 | { |
1429 | struct mgmt_mode *cp = cmd->cmd; | 1429 | struct mgmt_mode *cp = cmd->param; |
1430 | struct cmd_lookup *match = data; | 1430 | struct cmd_lookup *match = data; |
1431 | 1431 | ||
1432 | if (cp->val != match->val) | 1432 | if (cp->val != match->val) |
@@ -1525,7 +1525,7 @@ int mgmt_connected(u16 index, bdaddr_t *bdaddr) | |||
1525 | 1525 | ||
1526 | static void disconnect_rsp(struct pending_cmd *cmd, void *data) | 1526 | static void disconnect_rsp(struct pending_cmd *cmd, void *data) |
1527 | { | 1527 | { |
1528 | struct mgmt_cp_disconnect *cp = cmd->cmd; | 1528 | struct mgmt_cp_disconnect *cp = cmd->param; |
1529 | struct sock **sk = data; | 1529 | struct sock **sk = data; |
1530 | struct mgmt_rp_disconnect rp; | 1530 | struct mgmt_rp_disconnect rp; |
1531 | 1531 | ||