summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hidp
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-04-03 20:02:10 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2015-04-04 07:50:20 +0200
commitfd6413d882304ca66d99199db1561382e18396e4 (patch)
tree58e8bc5ce4a09e06ee4012bee80b715cec93b647 /net/bluetooth/hidp
parentBluetooth: cmtp: Use BIT(x) instead of (1 << x) (diff)
downloadlinux-fd6413d882304ca66d99199db1561382e18396e4.tar.xz
linux-fd6413d882304ca66d99199db1561382e18396e4.zip
Bluetooth: hidp: Use BIT(x) instead of (1 << x)
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hidp')
-rw-r--r--net/bluetooth/hidp/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 926a0e8b7136..a05b9dbf14c9 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -908,7 +908,7 @@ static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr,
kref_init(&session->ref);
atomic_set(&session->state, HIDP_SESSION_IDLING);
init_waitqueue_head(&session->state_queue);
- session->flags = req->flags & (1 << HIDP_BLUETOOTH_VENDOR_ID);
+ session->flags = req->flags & BIT(HIDP_BLUETOOTH_VENDOR_ID);
/* connection management */
bacpy(&session->bdaddr, bdaddr);
@@ -1366,7 +1366,7 @@ int hidp_connection_del(struct hidp_conndel_req *req)
if (!session)
return -ENOENT;
- if (req->flags & (1 << HIDP_VIRTUAL_CABLE_UNPLUG))
+ if (req->flags & BIT(HIDP_VIRTUAL_CABLE_UNPLUG))
hidp_send_ctrl_message(session,
HIDP_TRANS_HID_CONTROL |
HIDP_CTRL_VIRTUAL_CABLE_UNPLUG,