public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stuart MacDonald" <stuartm@connecttech.com>
To: "'Richard Knutsson'" <ricknu-0@student.ltu.se>,
	"'Andrew Morton'" <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-usb-devel@lists.sourceforge.net>
Subject: RE: [PATCH] usb/serial/whiteheat: Convert to generic boolean
Date: Mon, 19 Mar 2007 10:31:26 -0400	[thread overview]
Message-ID: <001101c76a33$4729b320$294b82ce@stuartm> (raw)
In-Reply-To: <20070317003342.14847.72517.sendpatchset@thinktank.campus.ltu.se>

From: Richard Knutsson [mailto:ricknu-0@student.ltu.se] 

Okay by me. Thanks Richard.

Signed-off-by: Stuart MacDonald <stuartm@connecttech.com>

..Stu

> Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
> ---
> Compile-tested with "allyes", "allmod" & "allno" on i386
> 
> 
> diff --git a/drivers/usb/serial/whiteheat.c 
> b/drivers/usb/serial/whiteheat.c
> index bf16e9e..27c5f8f 100644
> --- a/drivers/usb/serial/whiteheat.c
> +++ b/drivers/usb/serial/whiteheat.c
> @@ -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;
> diff --git a/drivers/usb/serial/whiteheat.h 
> b/drivers/usb/serial/whiteheat.h
> index d714eff..f160797 100644
> --- a/drivers/usb/serial/whiteheat.h
> +++ b/drivers/usb/serial/whiteheat.h
> @@ -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 */
> 


      reply	other threads:[~2007-03-19 14:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-17  0:36 [PATCH] usb/serial/whiteheat: Convert to generic boolean Richard Knutsson
2007-03-19 14:31 ` Stuart MacDonald [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001101c76a33$4729b320$294b82ce@stuartm' \
    --to=stuartm@connecttech.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=ricknu-0@student.ltu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox