LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [2.6.25 patch] fix drivers/usb/host/u132-hcd.c compilation
@ 2008-02-24  3:44 Adrian Bunk
  2008-02-24 11:15 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2008-02-24  3:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, gregkh; +Cc: linux-usb, linux-kernel

This patch fixes the following compile error caused by
commit 3a2d5b700132f35401f1d9e22fe3c2cab02c2549:

<--  snip  -->

...
  CC      drivers/usb/host/u132-hcd.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c: 
In function ‘u132_suspend’:
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c:3224: error: expected expression before ‘int’
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c:3225: error: ‘ports’ undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c:3225: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c:3225: error: for each function it appears in.)
make[4]: *** [drivers/usb/host/u132-hcd.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---
69cf78da6371ad2aca30844858eeea318b37b3ec diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index 6fca069..325c6c7 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -3221,9 +3221,11 @@ static int u132_suspend(struct platform_device *pdev, pm_message_t state)
 			break;
 		case PM_EVENT_SUSPEND:
 		case PM_EVENT_HIBERNATE:
-                        int ports = MAX_U132_PORTS;
-                        while (ports-- > 0) {
-                                port_power(u132, ports, 0);
+			{
+				int ports = MAX_U132_PORTS;
+				while (ports-- > 0) {
+					port_power(u132, ports, 0);
+				}
                         }
 			break;
 		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [2.6.25 patch] fix drivers/usb/host/u132-hcd.c compilation
  2008-02-24  3:44 [2.6.25 patch] fix drivers/usb/host/u132-hcd.c compilation Adrian Bunk
@ 2008-02-24 11:15 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2008-02-24 11:15 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: gregkh, linux-usb, linux-kernel

On Sunday, 24 of February 2008, Adrian Bunk wrote:
> This patch fixes the following compile error caused by
> commit 3a2d5b700132f35401f1d9e22fe3c2cab02c2549:

Thanks, it has already been fixed in the mainline.

> <--  snip  -->
> 
> ...
>   CC      drivers/usb/host/u132-hcd.o
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c: 
> In function ‘u132_suspend’:
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c:3224: error: expected expression before ‘int’
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c:3225: error: ‘ports’ undeclared (first use in this function)
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c:3225: error: (Each undeclared identifier is reported only once
> /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/usb/host/u132-hcd.c:3225: error: for each function it appears in.)
> make[4]: *** [drivers/usb/host/u132-hcd.o] Error 1
> 
> <--  snip  -->
> 
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
> 
> ---
> 69cf78da6371ad2aca30844858eeea318b37b3ec diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
> index 6fca069..325c6c7 100644
> --- a/drivers/usb/host/u132-hcd.c
> +++ b/drivers/usb/host/u132-hcd.c
> @@ -3221,9 +3221,11 @@ static int u132_suspend(struct platform_device *pdev, pm_message_t state)
>  			break;
>  		case PM_EVENT_SUSPEND:
>  		case PM_EVENT_HIBERNATE:
> -                        int ports = MAX_U132_PORTS;
> -                        while (ports-- > 0) {
> -                                port_power(u132, ports, 0);
> +			{
> +				int ports = MAX_U132_PORTS;
> +				while (ports-- > 0) {
> +					port_power(u132, ports, 0);
> +				}
>                          }
>  			break;
>  		}
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-24 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-24  3:44 [2.6.25 patch] fix drivers/usb/host/u132-hcd.c compilation Adrian Bunk
2008-02-24 11:15 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).