aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hidp
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-09-03 17:29:46 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2010-10-12 11:44:52 -0400
commitd6b2eb2f893547d7488d31a7088d78dd77ab5995 (patch)
treefd632fa1316348a928bfc4dce7fbdb02b209467f /net/bluetooth/hidp
parentcb810a189da312d4074cb3fc8b0267b7115e7be1 (diff)
Bluetooth: make batostr() print in the right order
The Bluetooth core uses the the BD_ADDR in the opposite order from the human readable order. So we are changing batostr() to print in the correct order and then removing some baswap(), as they are not needed anymore. Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hidp')
-rw-r--r--net/bluetooth/hidp/core.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index bfe641b7dfaf..c0ee8b3928ed 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -758,7 +758,6 @@ static int hidp_setup_hid(struct hidp_session *session,
758 struct hidp_connadd_req *req) 758 struct hidp_connadd_req *req)
759{ 759{
760 struct hid_device *hid; 760 struct hid_device *hid;
761 bdaddr_t src, dst;
762 int err; 761 int err;
763 762
764 session->rd_data = kzalloc(req->rd_size, GFP_KERNEL); 763 session->rd_data = kzalloc(req->rd_size, GFP_KERNEL);
@@ -781,9 +780,6 @@ static int hidp_setup_hid(struct hidp_session *session,
781 780
782 hid->driver_data = session; 781 hid->driver_data = session;
783 782
784 baswap(&src, &bt_sk(session->ctrl_sock->sk)->src);
785 baswap(&dst, &bt_sk(session->ctrl_sock->sk)->dst);
786
787 hid->bus = BUS_BLUETOOTH; 783 hid->bus = BUS_BLUETOOTH;
788 hid->vendor = req->vendor; 784 hid->vendor = req->vendor;
789 hid->product = req->product; 785 hid->product = req->product;
@@ -791,8 +787,8 @@ static int hidp_setup_hid(struct hidp_session *session,
791 hid->country = req->country; 787 hid->country = req->country;
792 788
793 strncpy(hid->name, req->name, 128); 789 strncpy(hid->name, req->name, 128);
794 strncpy(hid->phys, batostr(&src), 64); 790 strncpy(hid->phys, batostr(&bt_sk(session->ctrl_sock->sk)->src), 64);
795 strncpy(hid->uniq, batostr(&dst), 64); 791 strncpy(hid->uniq, batostr(&bt_sk(session->ctrl_sock->sk)->dst), 64);
796 792
797 hid->dev.parent = hidp_get_device(session); 793 hid->dev.parent = hidp_get_device(session);
798 hid->ll_driver = &hidp_hid_driver; 794 hid->ll_driver = &hidp_hid_driver;