Skip to content

Commit

Permalink
USB: whiteheat: Convert to generic boolean
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Stuart MacDonald <stuartm@connecttech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Richard Knutsson authored and Greg Kroah-Hartman committed Apr 27, 2007
1 parent 5ec1862 commit 38c3cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/serial/whiteheat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ static int firm_send_command (struct usb_serial_port *port, __u8 command, __u8 *
command_port = port->serial->port[COMMAND_PORT];
command_info = usb_get_serial_port_data(command_port);
spin_lock_irqsave(&command_info->lock, flags);
command_info->command_finished = FALSE;
command_info->command_finished = false;

transfer_buffer = (__u8 *)command_port->write_urb->transfer_buffer;
transfer_buffer[0] = command;
Expand All @@ -1124,12 +1124,12 @@ static int firm_send_command (struct usb_serial_port *port, __u8 command, __u8 *
spin_unlock_irqrestore(&command_info->lock, flags);

/* wait for the command to complete */
wait_event_interruptible_timeout(command_info->wait_command,
(command_info->command_finished != FALSE), COMMAND_TIMEOUT);
wait_event_interruptible_timeout(command_info->wait_command,
(bool)command_info->command_finished, COMMAND_TIMEOUT);

spin_lock_irqsave(&command_info->lock, flags);

if (command_info->command_finished == FALSE) {
if (command_info->command_finished == false) {
dbg("%s - command timed out.", __FUNCTION__);
retval = -ETIMEDOUT;
goto exit;
Expand Down
4 changes: 0 additions & 4 deletions drivers/usb/serial/whiteheat.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
#define __LINUX_USB_SERIAL_WHITEHEAT_H


#define FALSE 0
#define TRUE 1


/* WhiteHEAT commands */
#define WHITEHEAT_OPEN 1 /* open the port */
#define WHITEHEAT_CLOSE 2 /* close the port */
Expand Down

0 comments on commit 38c3cb5

Please sign in to comment.