Commit ab6426e3 authored by Payal Kshirsagar's avatar Payal Kshirsagar Committed by Greg Kroah-Hartman

staging: emxx_udc: emxx_udc.c: Replace bit shifting with BIT macro

Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by: default avatarPayal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 36cbd685
...@@ -1495,10 +1495,10 @@ static int std_req_get_status(struct nbu2ss_udc *udc) ...@@ -1495,10 +1495,10 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
case USB_RECIP_DEVICE: case USB_RECIP_DEVICE:
if (udc->ctrl.wIndex == 0x0000) { if (udc->ctrl.wIndex == 0x0000) {
if (udc->gadget.is_selfpowered) if (udc->gadget.is_selfpowered)
status_data |= (1 << USB_DEVICE_SELF_POWERED); status_data |= BIT(USB_DEVICE_SELF_POWERED);
if (udc->remote_wakeup) if (udc->remote_wakeup)
status_data |= (1 << USB_DEVICE_REMOTE_WAKEUP); status_data |= BIT(USB_DEVICE_REMOTE_WAKEUP);
result = 0; result = 0;
} }
...@@ -1510,7 +1510,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc) ...@@ -1510,7 +1510,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
result = _nbu2ss_get_ep_stall(udc, ep_adrs); result = _nbu2ss_get_ep_stall(udc, ep_adrs);
if (result > 0) if (result > 0)
status_data |= (1 << USB_ENDPOINT_HALT); status_data |= BIT(USB_ENDPOINT_HALT);
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment