diff options
author | Mathieu OTHACEHE <m.othacehe@gmail.com> | 2016-02-04 19:01:29 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2016-02-28 14:36:53 +0100 |
commit | ce9d8562536f1289f7cb7afb1d4b2e0d27d2eb2c (patch) | |
tree | b581d4b2b446f51489fdf0bd2275e0fc51a1eda9 /drivers/usb/serial/iuu_phoenix.c | |
parent | 0f3083af5fde121abefddf70c84ba51455ae310f (diff) |
USB: serial: fix boolinit.cocci warnings
Bool initializations should use true and false. Bool tests don't need
comparisons.
Also, use IS_ENABLED instead of ifdef.
Generated by: scripts/coccinelle/misc/boolinit.cocci
Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/iuu_phoenix.c')
-rw-r--r-- | drivers/usb/serial/iuu_phoenix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 5ad4a0fb4b26..344b4eea4bd5 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c @@ -360,7 +360,7 @@ static void iuu_led_activity_on(struct urb *urb) int result; char *buf_ptr = port->write_urb->transfer_buffer; *buf_ptr++ = IUU_SET_LED; - if (xmas == 1) { + if (xmas) { get_random_bytes(buf_ptr, 6); *(buf_ptr+7) = 1; } else { @@ -380,7 +380,7 @@ static void iuu_led_activity_off(struct urb *urb) struct usb_serial_port *port = urb->context; int result; char *buf_ptr = port->write_urb->transfer_buffer; - if (xmas == 1) { + if (xmas) { iuu_rxcmd(urb); return; } else { |