* [PATCH] MIPS: sead3_led: Use LED_CORE_SUSPENDRESUME
@ 2013-02-17 12:28 Lars-Peter Clausen
2013-02-20 20:31 ` Steven Hill
0 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2013-02-17 12:28 UTC (permalink / raw)
To: Ralf Baechle
Cc: Steven J. Hill, Kristian Kielhofner, linux-mips,
Lars-Peter Clausen
Setting the LED_CORE_SUSPENDRESUME flag causes the LED driver core to call
led_classdev_suspend/led_classdev_resume during suspend/resume. Since this is
exactly what the driver's custom suspend/resume callbacks do we can replace them
by setting the LED_CORE_SUSPENDRESUME flag.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
arch/mips/mti-sead3/leds-sead3.c | 24 ++----------------------
1 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/arch/mips/mti-sead3/leds-sead3.c b/arch/mips/mti-sead3/leds-sead3.c
index 322148c..0a168c9 100644
--- a/arch/mips/mti-sead3/leds-sead3.c
+++ b/arch/mips/mti-sead3/leds-sead3.c
@@ -34,33 +34,15 @@ static void sead3_fled_set(struct led_classdev *led_cdev,
static struct led_classdev sead3_pled = {
.name = "sead3::pled",
.brightness_set = sead3_pled_set,
+ .flags = LED_CORE_SUSPENDRESUME,
};
static struct led_classdev sead3_fled = {
.name = "sead3::fled",
.brightness_set = sead3_fled_set,
+ .flags = LED_CORE_SUSPENDRESUME,
};
-#ifdef CONFIG_PM
-static int sead3_led_suspend(struct platform_device *dev,
- pm_message_t state)
-{
- led_classdev_suspend(&sead3_pled);
- led_classdev_suspend(&sead3_fled);
- return 0;
-}
-
-static int sead3_led_resume(struct platform_device *dev)
-{
- led_classdev_resume(&sead3_pled);
- led_classdev_resume(&sead3_fled);
- return 0;
-}
-#else
-#define sead3_led_suspend NULL
-#define sead3_led_resume NULL
-#endif
-
static int sead3_led_probe(struct platform_device *pdev)
{
int ret;
@@ -86,8 +68,6 @@ static int sead3_led_remove(struct platform_device *pdev)
static struct platform_driver sead3_led_driver = {
.probe = sead3_led_probe,
.remove = sead3_led_remove,
- .suspend = sead3_led_suspend,
- .resume = sead3_led_resume,
.driver = {
.name = DRVNAME,
.owner = THIS_MODULE,
--
1.7.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* RE: [PATCH] MIPS: sead3_led: Use LED_CORE_SUSPENDRESUME
2013-02-17 12:28 [PATCH] MIPS: sead3_led: Use LED_CORE_SUSPENDRESUME Lars-Peter Clausen
@ 2013-02-20 20:31 ` Steven Hill
2013-02-20 20:42 ` Lars-Peter Clausen
0 siblings, 1 reply; 6+ messages in thread
From: Steven Hill @ 2013-02-20 20:31 UTC (permalink / raw)
To: Lars-Peter Clausen, Ralf Baechle
Cc: Kristian Kielhofner, linux-mips@linux-mips.org
Hello.
This patch does not apply cleanly because of space/tab differences. In both of the lines below with '.brightness_set' the character between 't' and '=' needs to be a tab, not a space.
-Steve
@@ -34,33 +34,15 @@ static void sead3_fled_set(struct led_classdev *led_cdev,
static struct led_classdev sead3_pled = {
.name = "sead3::pled",
.brightness_set = sead3_pled_set,
+ .flags = LED_CORE_SUSPENDRESUME,
};
static struct led_classdev sead3_fled = {
.name = "sead3::fled",
.brightness_set = sead3_fled_set,
+ .flags = LED_CORE_SUSPENDRESUME,
};
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] MIPS: sead3_led: Use LED_CORE_SUSPENDRESUME
2013-02-20 20:31 ` Steven Hill
@ 2013-02-20 20:42 ` Lars-Peter Clausen
2013-02-20 20:44 ` Steven Hill
0 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2013-02-20 20:42 UTC (permalink / raw)
To: Steven Hill; +Cc: Ralf Baechle, Kristian Kielhofner, linux-mips@linux-mips.org
On 02/20/2013 09:31 PM, Steven Hill wrote:
> Hello.
>
> This patch does not apply cleanly because of space/tab differences. In both of the lines below with '.brightness_set' the character between 't' and '=' needs to be a tab, not a space.
>
> -Steve
Hi,
The patch depends on commit 70342287 ("MIPS: Whitespace cleanup.").
- Lars
>
>
> @@ -34,33 +34,15 @@ static void sead3_fled_set(struct led_classdev *led_cdev,
> static struct led_classdev sead3_pled = {
> .name = "sead3::pled",
> .brightness_set = sead3_pled_set,
> + .flags = LED_CORE_SUSPENDRESUME,
> };
>
> static struct led_classdev sead3_fled = {
> .name = "sead3::fled",
> .brightness_set = sead3_fled_set,
> + .flags = LED_CORE_SUSPENDRESUME,
> };
>
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: [PATCH] MIPS: sead3_led: Use LED_CORE_SUSPENDRESUME
2013-02-20 20:42 ` Lars-Peter Clausen
@ 2013-02-20 20:44 ` Steven Hill
2013-02-20 21:02 ` Lars-Peter Clausen
0 siblings, 1 reply; 6+ messages in thread
From: Steven Hill @ 2013-02-20 20:44 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Ralf Baechle, Kristian Kielhofner, linux-mips@linux-mips.org
Lars,
Please format patches for Malta and SEAD-3 to be against my 'linux-sjhill.git' repo and the 'mti-next' branch. Thanks.
-Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] MIPS: sead3_led: Use LED_CORE_SUSPENDRESUME
2013-02-20 20:44 ` Steven Hill
@ 2013-02-20 21:02 ` Lars-Peter Clausen
2013-02-20 21:07 ` Steven Hill
0 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2013-02-20 21:02 UTC (permalink / raw)
To: Steven Hill; +Cc: Ralf Baechle, Kristian Kielhofner, linux-mips@linux-mips.org
On 02/20/2013 09:44 PM, Steven Hill wrote:
> Lars,
>
> Please format patches for Malta and SEAD-3 to be against my 'linux-sjhill.git' repo and the 'mti-next' branch. Thanks.
Hi,
Can you fixup the patch manually in this case? It's probably faster for both of
us than having me re-send the patch.
Btw. I think it would be a good idea to add the information about your git repo
to MAINTAINERS.
- Lars
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-20 21:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-17 12:28 [PATCH] MIPS: sead3_led: Use LED_CORE_SUSPENDRESUME Lars-Peter Clausen
2013-02-20 20:31 ` Steven Hill
2013-02-20 20:42 ` Lars-Peter Clausen
2013-02-20 20:44 ` Steven Hill
2013-02-20 21:02 ` Lars-Peter Clausen
2013-02-20 21:07 ` Steven Hill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox