aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/bluetooth.h
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-05-23 03:04:20 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-04 23:34:08 -0400
commitc3c7ea65941a0b7a4f1b9655e7aaaab6ce1874d2 (patch)
tree09643091d66605256524b9c601cd08edf01a4a26 /include/net/bluetooth/bluetooth.h
parentfc5fef615a963c8b13abf0bbc2a8e8d7c3fd1ffb (diff)
Bluetooth: Fix coding style in include/net/bluetooth
Fix all warning and errors reported by checkpatch but license trailing whitespace and bdaddr_t definition. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth/bluetooth.h')
-rw-r--r--include/net/bluetooth/bluetooth.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index b98181bd2b33..7a9f9612db5a 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -25,7 +25,7 @@
25#ifndef __BLUETOOTH_H 25#ifndef __BLUETOOTH_H
26#define __BLUETOOTH_H 26#define __BLUETOOTH_H
27 27
28#include <asm/types.h> 28#include <linux/types.h>
29#include <asm/byteorder.h> 29#include <asm/byteorder.h>
30#include <linux/list.h> 30#include <linux/list.h>
31#include <linux/poll.h> 31#include <linux/poll.h>
@@ -168,8 +168,8 @@ typedef struct {
168#define BDADDR_LE_PUBLIC 0x01 168#define BDADDR_LE_PUBLIC 0x01
169#define BDADDR_LE_RANDOM 0x02 169#define BDADDR_LE_RANDOM 0x02
170 170
171#define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) 171#define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0} })
172#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) 172#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff} })
173 173
174/* Copy, swap, convert BD Address */ 174/* Copy, swap, convert BD Address */
175static inline int bacmp(bdaddr_t *ba1, bdaddr_t *ba2) 175static inline int bacmp(bdaddr_t *ba1, bdaddr_t *ba2)
@@ -215,7 +215,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
215 struct msghdr *msg, size_t len, int flags); 215 struct msghdr *msg, size_t len, int flags);
216int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, 216int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
217 struct msghdr *msg, size_t len, int flags); 217 struct msghdr *msg, size_t len, int flags);
218uint bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait); 218uint bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait);
219int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 219int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
220int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); 220int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo);
221 221
@@ -225,12 +225,12 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
225 225
226/* Skb helpers */ 226/* Skb helpers */
227struct l2cap_ctrl { 227struct l2cap_ctrl {
228 unsigned int sframe : 1, 228 unsigned int sframe:1,
229 poll : 1, 229 poll:1,
230 final : 1, 230 final:1,
231 fcs : 1, 231 fcs:1,
232 sar : 2, 232 sar:2,
233 super : 2; 233 super:2;
234 __u16 reqseq; 234 __u16 reqseq;
235 __u16 txseq; 235 __u16 txseq;
236 __u8 retries; 236 __u8 retries;
@@ -249,7 +249,8 @@ static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
249{ 249{
250 struct sk_buff *skb; 250 struct sk_buff *skb;
251 251
252 if ((skb = alloc_skb(len + BT_SKB_RESERVE, how))) { 252 skb = alloc_skb(len + BT_SKB_RESERVE, how);
253 if (skb) {
253 skb_reserve(skb, BT_SKB_RESERVE); 254 skb_reserve(skb, BT_SKB_RESERVE);
254 bt_cb(skb)->incoming = 0; 255 bt_cb(skb)->incoming = 0;
255 } 256 }
@@ -261,7 +262,8 @@ static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk,
261{ 262{
262 struct sk_buff *skb; 263 struct sk_buff *skb;
263 264
264 if ((skb = sock_alloc_send_skb(sk, len + BT_SKB_RESERVE, nb, err))) { 265 skb = sock_alloc_send_skb(sk, len + BT_SKB_RESERVE, nb, err);
266 if (skb) {
265 skb_reserve(skb, BT_SKB_RESERVE); 267 skb_reserve(skb, BT_SKB_RESERVE);
266 bt_cb(skb)->incoming = 0; 268 bt_cb(skb)->incoming = 0;
267 } 269 }