From: akpm@linux-foundation.org
To: rjw@sisk.pl, greg@kroah.com, kay.sievers@vrfy.org,
lenb@kernel.org, linville@tuxdriver.com, mb@bu3sch.de,
pavel@ucw.cz, rpurdie@rpsys.net, stern@rowland.harvard.edu,
mm-commits@vger.kernel.org
Subject: - leds-add-possibility-to-remove-leds-classdevs-during-suspend-resume.patch removed from -mm tree
Date: Tue, 05 Feb 2008 14:34:21 -0800 [thread overview]
Message-ID: <200802052234.m15MY2dY012481@imap1.linux-foundation.org> (raw)
The patch titled
leds: add possibility to remove leds classdevs during suspend/resume
has been removed from the -mm tree. Its filename was
leds-add-possibility-to-remove-leds-classdevs-during-suspend-resume.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: leds: add possibility to remove leds classdevs during suspend/resume
From: Rafael J. Wysocki <rjw@sisk.pl>
Make it possible to unregister a led classdev object in a safe way during a
suspend/resume cycle.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/leds/led-class.c | 13 +++++++++----
include/linux/leds.h | 10 +++++++++-
2 files changed, 18 insertions(+), 5 deletions(-)
diff -puN drivers/leds/led-class.c~leds-add-possibility-to-remove-leds-classdevs-during-suspend-resume drivers/leds/led-class.c
--- a/drivers/leds/led-class.c~leds-add-possibility-to-remove-leds-classdevs-during-suspend-resume
+++ a/drivers/leds/led-class.c
@@ -137,12 +137,14 @@ err_out:
EXPORT_SYMBOL_GPL(led_classdev_register);
/**
- * led_classdev_unregister - unregisters a object of led_properties class.
+ * __led_classdev_unregister - unregisters a object of led_properties class.
* @led_cdev: the led device to unregister
+ * @suspended: indicates whether system-wide suspend or resume is in progress
*
* Unregisters a previously registered via led_classdev_register object.
*/
-void led_classdev_unregister(struct led_classdev *led_cdev)
+void __led_classdev_unregister(struct led_classdev *led_cdev,
+ bool suspended)
{
device_remove_file(led_cdev->dev, &dev_attr_brightness);
#ifdef CONFIG_LEDS_TRIGGERS
@@ -153,13 +155,16 @@ void led_classdev_unregister(struct led_
up_write(&led_cdev->trigger_lock);
#endif
- device_unregister(led_cdev->dev);
+ if (suspended)
+ device_pm_schedule_removal(led_cdev->dev);
+ else
+ device_unregister(led_cdev->dev);
down_write(&leds_list_lock);
list_del(&led_cdev->node);
up_write(&leds_list_lock);
}
-EXPORT_SYMBOL_GPL(led_classdev_unregister);
+EXPORT_SYMBOL_GPL(__led_classdev_unregister);
static int __init leds_init(void)
{
diff -puN include/linux/leds.h~leds-add-possibility-to-remove-leds-classdevs-during-suspend-resume include/linux/leds.h
--- a/include/linux/leds.h~leds-add-possibility-to-remove-leds-classdevs-during-suspend-resume
+++ a/include/linux/leds.h
@@ -54,7 +54,15 @@ struct led_classdev {
extern int led_classdev_register(struct device *parent,
struct led_classdev *led_cdev);
-extern void led_classdev_unregister(struct led_classdev *led_cdev);
+extern void __led_classdev_unregister(struct led_classdev *led_cdev, bool sus);
+static inline void led_classdev_unregister(struct led_classdev *lcd)
+{
+ __led_classdev_unregister(lcd, false);
+}
+static inline void led_classdev_unregister_suspended(struct led_classdev *lcd)
+{
+ __led_classdev_unregister(lcd, true);
+}
extern void led_classdev_suspend(struct led_classdev *led_cdev);
extern void led_classdev_resume(struct led_classdev *led_cdev);
_
Patches currently in -mm which might be from rjw@sisk.pl are
origin.patch
git-acpi.patch
git-x86.patch
git-xfs.patch
proc-fix-the-threaded-proc-self.patch
shrink_slab-handle-bad-shrinkers.patch
reply other threads:[~2008-02-05 22:45 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=200802052234.m15MY2dY012481@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mb@bu3sch.de \
--cc=mm-commits@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=rpurdie@rpsys.net \
--cc=stern@rowland.harvard.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.