usb/serial/whiteheat: Convert to generic boolean
Subsystems (2)
PATCH 1/1 usb/serial/whiteheat: Convert to generic boolean
Signed-off-by Richard Knutsson <[email protected]>
---
Compile-tested with "allyes", "allmod" & "allno" on i386
drivers/usb/serial/whiteheat.c +4 -4
@@ -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;
@@ -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;
drivers/usb/serial/whiteheat.h +0 -4
@@ -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 */
From: Richard Knutsson [mailto:[email protected]]
Okay by me. Thanks Richard.
Signed-off-by Stuart MacDonald <[email protected]>
..Stu
Quoted 58 lines
Signed-off-by Richard Knutsson <[email protected]>---
Compile-tested with "allyes", "allmod" & "allno" on i386drivers/usb/serial/whiteheat.c +0
-0@@ -1109,7 +1109,7 @@ static int firm_send_command (struct
usb_serial_port*port,__u8command,__u8*drivers/usb/serial/whiteheat.c +1
-1command_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;
drivers/usb/serial/whiteheat.c +0
-0transfer_buffer[0 ] = command;@@ -1124,12 +1124,12 @@ static int firm_send_command (struct
usb_serial_port*port,__u8command,__u8*drivers/usb/serial/whiteheat.c +0
-2spin_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);drivers/usb/serial/whiteheat.c +3
-1+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;drivers/usb/serial/whiteheat.h +0
-4@@ -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 */
#defineWHITEHEAT_CLOSE2 /*
close the port */