diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-06-07 12:06:51 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-06-08 08:50:01 -0400 |
commit | b4324b5dc5b62ba76372e1bf8927230cf744df66 (patch) | |
tree | 0827bb177760bd2bdac41fbf6466eb1c825b9d88 /net/bluetooth/rfcomm | |
parent | 47ec1dcd696d56a7c396e5838516a566ecd4b03d (diff) |
Bluetooth: Remove pointless endian conversion helpers
The Bluetooth source uses some endian conversion helpers, that in the end
translate to kernel standard routines. So remove this obfuscation since it
is fully pointless.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 374536e050aa..e50566ebf9f9 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -679,7 +679,7 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src, bdaddr_t *dst | |||
679 | 679 | ||
680 | bacpy(&addr.l2_bdaddr, dst); | 680 | bacpy(&addr.l2_bdaddr, dst); |
681 | addr.l2_family = AF_BLUETOOTH; | 681 | addr.l2_family = AF_BLUETOOTH; |
682 | addr.l2_psm = htobs(RFCOMM_PSM); | 682 | addr.l2_psm = cpu_to_le16(RFCOMM_PSM); |
683 | addr.l2_cid = 0; | 683 | addr.l2_cid = 0; |
684 | *err = kernel_connect(sock, (struct sockaddr *) &addr, sizeof(addr), O_NONBLOCK); | 684 | *err = kernel_connect(sock, (struct sockaddr *) &addr, sizeof(addr), O_NONBLOCK); |
685 | if (*err == 0 || *err == -EINPROGRESS) | 685 | if (*err == 0 || *err == -EINPROGRESS) |
@@ -852,9 +852,9 @@ static int rfcomm_send_pn(struct rfcomm_session *s, int cr, struct rfcomm_dlc *d | |||
852 | } | 852 | } |
853 | 853 | ||
854 | if (cr && channel_mtu >= 0) | 854 | if (cr && channel_mtu >= 0) |
855 | pn->mtu = htobs(channel_mtu); | 855 | pn->mtu = cpu_to_le16(channel_mtu); |
856 | else | 856 | else |
857 | pn->mtu = htobs(d->mtu); | 857 | pn->mtu = cpu_to_le16(d->mtu); |
858 | 858 | ||
859 | *ptr = __fcs(buf); ptr++; | 859 | *ptr = __fcs(buf); ptr++; |
860 | 860 | ||
@@ -1056,7 +1056,7 @@ static void rfcomm_make_uih(struct sk_buff *skb, u8 addr) | |||
1056 | 1056 | ||
1057 | if (len > 127) { | 1057 | if (len > 127) { |
1058 | hdr = (void *) skb_push(skb, 4); | 1058 | hdr = (void *) skb_push(skb, 4); |
1059 | put_unaligned(htobs(__len16(len)), (__le16 *) &hdr->len); | 1059 | put_unaligned(cpu_to_le16(__len16(len)), (__le16 *) &hdr->len); |
1060 | } else { | 1060 | } else { |
1061 | hdr = (void *) skb_push(skb, 3); | 1061 | hdr = (void *) skb_push(skb, 3); |
1062 | hdr->len = __len8(len); | 1062 | hdr->len = __len8(len); |
@@ -1289,7 +1289,7 @@ static int rfcomm_apply_pn(struct rfcomm_dlc *d, int cr, struct rfcomm_pn *pn) | |||
1289 | 1289 | ||
1290 | d->priority = pn->priority; | 1290 | d->priority = pn->priority; |
1291 | 1291 | ||
1292 | d->mtu = btohs(pn->mtu); | 1292 | d->mtu = __le16_to_cpu(pn->mtu); |
1293 | 1293 | ||
1294 | if (cr && d->mtu > s->mtu) | 1294 | if (cr && d->mtu > s->mtu) |
1295 | d->mtu = s->mtu; | 1295 | d->mtu = s->mtu; |
@@ -1922,7 +1922,7 @@ static int rfcomm_add_listener(bdaddr_t *ba) | |||
1922 | /* Bind socket */ | 1922 | /* Bind socket */ |
1923 | bacpy(&addr.l2_bdaddr, ba); | 1923 | bacpy(&addr.l2_bdaddr, ba); |
1924 | addr.l2_family = AF_BLUETOOTH; | 1924 | addr.l2_family = AF_BLUETOOTH; |
1925 | addr.l2_psm = htobs(RFCOMM_PSM); | 1925 | addr.l2_psm = cpu_to_le16(RFCOMM_PSM); |
1926 | addr.l2_cid = 0; | 1926 | addr.l2_cid = 0; |
1927 | err = kernel_bind(sock, (struct sockaddr *) &addr, sizeof(addr)); | 1927 | err = kernel_bind(sock, (struct sockaddr *) &addr, sizeof(addr)); |
1928 | if (err < 0) { | 1928 | if (err < 0) { |