Skip to content

Commit

Permalink
Bluetooth: hidp: Use BIT(x) instead of (1 << x)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
holtmann authored and Johan Hedberg committed Apr 4, 2015
1 parent b2ddeb1 commit fd6413d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/bluetooth/hidp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit fd6413d

Please sign in to comment.