public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mirco Tischler <mt-ml@gmx.de>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Jeff Chua <jeff.chua.linux@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jesse Barnes <jesse.barnes@intel.com>,
	Romano Giannetti <romano@dea.icai.upcomillas.es>,
	Dave Airlie <airlied@linux.ie>, Greg KH <gregkh@suse.de>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-acpi@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
	Alexey Starikovskiy <astarikovskiy@suse.de>,
	pm list <linux-pm@lists.linux-foundation.org>,
	Len Brown <lenb@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] PM: Introduce PM_EVENT_HIBERNATE (was: Re: i915 hibernation patch (was: Re: 2.6.25-rc2 System no longer ...))
Date: Sun, 24 Feb 2008 05:16:39 +0100	[thread overview]
Message-ID: <1203826599.30621.25.camel@mtlp> (raw)
In-Reply-To: <200802231913.27592.rjw@sisk.pl>

[-- Attachment #1: Type: text/plain, Size: 3234 bytes --]


On Sa, 2008-02-23 at 19:13 +0100, Rafael J. Wysocki wrote:
> Index: linux-2.6/drivers/usb/host/u132-hcd.c
> ===================================================================
> --- linux-2.6.orig/drivers/usb/host/u132-hcd.c
> +++ linux-2.6/drivers/usb/host/u132-hcd.c
> @@ -3214,14 +3214,19 @@ static int u132_suspend(struct platform_
>                  return -ESHUTDOWN;
>          } else {
>                  int retval = 0;
> -                if (state.event == PM_EVENT_FREEZE) {
> +
> +		switch (state.event) {
> +		case PM_EVENT_FREEZE:
>                          retval = u132_bus_suspend(hcd);
> -                } else if (state.event == PM_EVENT_SUSPEND) {
> +			break;
> +		case PM_EVENT_SUSPEND:
> +		case PM_EVENT_HIBERNATE:
>                          int ports = MAX_U132_PORTS;
>                          while (ports-- > 0) {
>                                  port_power(u132, ports, 0);
>                          }
> -                }
> +			break;
> +		}
>                  if (retval == 0)
>                          pdev->dev.power.power_state = state;
>                  return retval;
Hmm. Doesn't compile for me in 2.6.25-rc2-git7:

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

This fixes it:

Thanks
Mirco

---
From: Mirco Tischler <mt-ml@gmx.de>

Fixes the following compile error caused by commit
3a2d5b700132f35401f1d9e22fe3c2cab02c2549

...
  CC [M]  drivers/usb/host/u132-hcd.o
drivers/usb/host/u132-hcd.c: In function ‘u132_suspend’:
drivers/usb/host/u132-hcd.c:3224: error: expected expression before
‘int’
drivers/usb/host/u132-hcd.c:3225: error: ‘ports’ undeclared (first use
in this function)
...

Signed-off-by: Mirco Tischler <mt-ml@gmx.de>
---
 drivers/usb/host/u132-hcd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index 6fca069..58830b2 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -3214,6 +3214,7 @@ static int u132_suspend(struct platform_device
*pdev, pm_message_t state)
                 return -ESHUTDOWN;
         } else {
                 int retval = 0;
+		int ports = 0;
 
 		switch (state.event) {
 		case PM_EVENT_FREEZE:
@@ -3221,7 +3222,7 @@ 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;
+			ports = MAX_U132_PORTS;
                         while (ports-- > 0) {
                                 port_power(u132, ports, 0);
                         }


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2008-02-24  4:16 UTC|newest]

Thread overview: 111+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 17:17 2.6.25-rc2 System no longer powers off after suspend-to-disk. Screen becomes green Jeff Chua
2008-02-20 17:19 ` Jeff Chua
2008-02-20 17:28 ` Linus Torvalds
2008-02-20 17:37   ` Jeff Chua
2008-02-20 17:52     ` Linus Torvalds
2008-02-20 18:02       ` Jeff Chua
2008-02-21 19:43         ` [Suspend-devel] 2.6.25-rc2 System no longer powers off aftersuspend-to-disk. " Romano Giannetti
2008-02-21 21:02           ` Jesse Barnes
2008-02-22  0:20             ` Jeff Chua
2008-02-22  0:23               ` Jesse Barnes
2008-02-22  0:42                 ` Jeff Chua
2008-02-22  0:46                   ` Jesse Barnes
2008-02-22  0:52                     ` Jeff Chua
2008-02-22  1:02                       ` Jesse Barnes
2008-02-22  1:27                         ` Jeff Chua
2008-02-22  1:28                         ` Linus Torvalds
2008-02-22  1:35                           ` Jesse Barnes
2008-02-22 10:37                   ` Matthew Garrett
2008-02-22 13:06                     ` Ingo Molnar
2008-02-22 16:10                       ` Rafael J. Wysocki
2008-02-22 16:50                       ` Linus Torvalds
2008-02-22 18:01                       ` Matthew Garrett
2008-02-23 11:17                         ` Ingo Molnar
2008-02-22  0:31               ` Rafael J. Wysocki
2008-02-22  0:42                 ` Jeff Chua
2008-02-22  1:01                   ` Jeff Chua
2008-02-22  1:06                     ` Rafael J. Wysocki
2008-02-22  0:46                 ` Linus Torvalds
2008-02-22  0:54                   ` Rafael J. Wysocki
2008-02-22  1:13                     ` Jesse Barnes
2008-02-22  1:44                       ` Jesse Barnes
2008-02-22 23:31                         ` i915 hibernation patch (was: Re: [Suspend-devel] 2.6.25-rc2 System no longer powers off aftersuspend-to-disk. Screen becomes green.) Rafael J. Wysocki
2008-02-23  1:00                           ` Linus Torvalds
2008-02-23  1:55                             ` Rafael J. Wysocki
2008-02-23  2:07                               ` Linus Torvalds
2008-02-23  4:36                                 ` Jeff Chua
2008-02-23 18:13                                   ` [PATCH] PM: Introduce PM_EVENT_HIBERNATE (was: Re: i915 hibernation patch (was: Re: 2.6.25-rc2 System no longer ...)) Rafael J. Wysocki
2008-02-23 18:43                                     ` Linus Torvalds
2008-02-24  8:29                                       ` Pavel Machek
2008-02-24 15:21                                       ` Jeff Chua
2008-02-24  4:16                                     ` Mirco Tischler [this message]
2008-02-24 11:11                                       ` Rafael J. Wysocki
2008-02-24 11:25                                         ` Rafael J. Wysocki
2008-02-23 11:17                               ` i915 hibernation patch (was: Re: [Suspend-devel] 2.6.25-rc2 System no longer powers off aftersuspend-to-disk. Screen becomes green.) Pavel Machek
2008-02-20 17:54   ` 2.6.25-rc2 System no longer powers off after suspend-to-disk. Screen becomes green Jeff Chua
2008-02-20 18:37     ` Linus Torvalds
2008-02-18  6:31       ` [Suspend-devel] " Pavel Machek
2008-02-20 18:49       ` Jeff Chua
2008-02-20 19:25         ` Matthew Garrett
2008-02-20 18:57       ` Jesse Barnes
2008-02-20 17:50 ` Jesse Barnes
2008-02-20 18:29   ` Jeff Chua
2008-02-20 18:53     ` Jesse Barnes
2008-02-20 19:10       ` Jeff Chua
2008-02-20 19:18         ` Jesse Barnes
2008-02-20 20:09           ` Jesse Barnes
2008-02-20 20:14             ` Rafael J. Wysocki
2008-02-20 20:29               ` Linus Torvalds
2008-02-20 20:33                 ` [Suspend-devel] " Pablo Sanchez
2008-02-20 20:41                 ` Jesse Barnes
2008-02-20 21:13                   ` Linus Torvalds
2008-02-20 21:44                     ` Jesse Barnes
2008-02-20 22:22                       ` Linus Torvalds
2008-02-21  8:30                         ` david
2008-02-22 16:56                           ` Mark Lord
2008-02-22 17:02                             ` Rafael J. Wysocki
2008-02-22 17:32                               ` Mark Lord
2008-02-22 17:44                                 ` Rafael J. Wysocki
2008-02-22 19:23                                   ` david
2008-02-22 23:16                                     ` Rafael J. Wysocki
2008-02-20 22:36                       ` Rafael J. Wysocki
2008-02-20 23:13                         ` Linus Torvalds
2008-02-20 23:35                           ` Rafael J. Wysocki
2008-02-21  0:00                             ` Linus Torvalds
2008-02-21  0:13                               ` Rafael J. Wysocki
2008-02-21  0:25                                 ` Linus Torvalds
2008-02-21  0:59                                   ` Rafael J. Wysocki
2008-02-22 16:54                             ` Mark Lord
2008-02-20 22:45                       ` Nigel Cunningham
2008-02-21  0:13                         ` Matthew Garrett
2008-02-21  0:40                           ` Nigel Cunningham
2008-02-21  0:46                             ` Greg KH
2008-02-21  1:17                               ` Nigel Cunningham
2008-02-21  4:43                                 ` Greg KH
2008-02-21  6:05                                   ` Nigel Cunningham
2008-02-21  6:37                                     ` Greg KH
2008-02-21  1:10                             ` Matthew Garrett
2008-02-21  1:25                               ` Nigel Cunningham
2008-02-20 20:45                 ` [Suspend-devel] " Rafael J. Wysocki
2008-02-20 21:26                   ` Alexey Starikovskiy
2008-02-20 21:37         ` Jesse Barnes
2008-02-21  0:35           ` Jeff Chua
2008-02-21  0:39             ` Jesse Barnes
2008-02-21  1:19               ` Jeff Chua
2008-02-21  1:21                 ` Jesse Barnes
2008-02-21  1:49                   ` Jeff Chua
2008-02-21  2:00               ` Jeff Chua
2008-02-21 16:27                 ` [Suspend-devel] " Rafael J. Wysocki
2008-02-21 18:34                   ` Jesse Barnes
2008-02-21 20:30                     ` Rafael J. Wysocki
2008-02-21 22:11                     ` Rafael J. Wysocki
2008-02-21 23:45                       ` Jesse Barnes
2008-02-22  0:28                         ` Rafael J. Wysocki
2008-02-22  0:48                         ` Jeff Chua
2008-02-20 22:32         ` Jesse Barnes
2008-02-20 23:03           ` Jesse Barnes
2008-02-20 23:34             ` Jesse Barnes
2008-02-20 23:49               ` Rafael J. Wysocki
2008-02-21  0:17                 ` Jesse Barnes
2008-02-21  1:07                   ` [Suspend-devel] " Rafael J. Wysocki
2008-02-20 18:47 ` Mark Lord

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=1203826599.30621.25.camel@mtlp \
    --to=mt-ml@gmx.de \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=astarikovskiy@suse.de \
    --cc=gregkh@suse.de \
    --cc=jeff.chua.linux@gmail.com \
    --cc=jesse.barnes@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=romano@dea.icai.upcomillas.es \
    --cc=torvalds@linux-foundation.org \
    /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