From: Matt Helsley <matthltc@us.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Power Management <linux-pm@lists.linux-foundation.org>,
David Brownell <dbrownell@users.sourceforge.net>
Subject: [PATCH] PM: for-mm: Fix compile failure in boot time suspend selftest
Date: Thu, 12 Jun 2008 16:24:36 -0700 [thread overview]
Message-ID: <1213313076.7066.37.camel@localhost.localdomain> (raw)
The following config revealed a compilation problem in the suspend
self test program included in 2.6.26-rc5-mm2:
kernel/power/main.c: In function 'test_suspend':
kernel/power/main.c:688: warning: passing argument 2 of 'class_find_device' from incompatible pointer type
kernel/power/main.c:688: error: too few arguments to function 'class_find_device'
make[2]: *** [kernel/power/main.o] Error 1
#
# Power management options
#
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_PM_VERBOSE=y
CONFIG_CAN_PM_TRACE=y
CONFIG_PM_TRACE=y
CONFIG_PM_TRACE_RTC=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_PM_TEST_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_HIBERNATION is not set
Fix the compilation error by using NULL to tell
class_find_device() that we're initiating an iteration rather than
resuming a previously-initiated one.
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
---
Applies to 2.6.26-rc5-mm2
WARNING: Compiles (for me) but is otherwise untested. I'll be
booting with this soon when I start testing some other
work that's not in 2.6.26-rc5-mm2.
kernel/power/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.26-rc5-mm2/kernel/power/main.c
===================================================================
--- linux-2.6.26-rc5-mm2.orig/kernel/power/main.c
+++ linux-2.6.26-rc5-mm2/kernel/power/main.c
@@ -683,11 +683,11 @@ static int __init test_suspend(void)
printk(warn_bad_state, pm_states[test_state]);
goto done;
}
/* RTCs have initialized by now too ... can we use one? */
- class_find_device(rtc_class, &pony, has_wakealarm);
+ class_find_device(rtc_class, NULL, &pony, has_wakealarm);
if (pony)
rtc = rtc_class_open(pony);
if (!rtc) {
printk(warn_no_rtc);
goto done;
reply other threads:[~2008-06-12 23:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1213313076.7066.37.camel@localhost.localdomain \
--to=matthltc@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-pm@lists.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