From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/9] s3c2410fb: Use dev_pm_ops
Date: Fri, 26 Apr 2013 20:02:19 +0000 [thread overview]
Message-ID: <1367006543-5458-6-git-send-email-sylvester.nawrocki@gmail.com> (raw)
In-Reply-To: <1367006543-5458-1-git-send-email-sylvester.nawrocki@gmail.com>
Use the driver PM ops rather than legacy suspend/resume callbacks.
Also use CONFIG_PM_SLEEP switch to compile in the system sleep
code instead of CONFIG_PM.
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
drivers/video/s3c2410fb.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index d6706f7..479ab45 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -26,6 +26,7 @@
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/pm.h>
#include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/io.h>
@@ -36,10 +37,6 @@
#include <asm/mach/map.h>
#include <mach/regs-gpio.h>
-#ifdef CONFIG_PM
-#include <linux/pm.h>
-#endif
-
#include "s3c2410fb.h"
/* Debugging stuff */
@@ -1044,8 +1041,7 @@ static int s3c2410fb_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
-
+#ifdef CONFIG_PM_SLEEP
/* suspend and resume support for the lcd controller */
static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state)
{
@@ -1081,9 +1077,14 @@ static int s3c2410fb_resume(struct platform_device *dev)
return 0;
}
+static const struct dev_pm_ops s3c2410fb_pm_ops = {
+ .resume = s3c2410fb_resume,
+ .suspend = s3c2410fb_suspend,
+};
+
+#define S3C2410FB_PM_OPS (&s3c2410fb_pm_ops)
#else
-#define s3c2410fb_suspend NULL
-#define s3c2410fb_resume NULL
+#define S3C2410FB_PM_OPS (NULL)
#endif
static struct platform_device_id s3c2410fb_driver_ids[] = {
@@ -1099,12 +1100,11 @@ static struct platform_device_id s3c2410fb_driver_ids[] = {
static struct platform_driver s3c2410fb_driver = {
.probe = s3c2410fb_probe,
.remove = s3c2410fb_remove,
- .suspend = s3c2410fb_suspend,
- .resume = s3c2410fb_resume,
.id_table = s3c2410fb_driver_ids,
.driver = {
.name = "s3c2410-lcd",
.owner = THIS_MODULE,
+ .pm = S3C2410FB_PM_OPS,
},
};
--
1.7.4.1
WARNING: multiple messages have this Message-ID (diff)
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: kgene.kim@samsung.com, FlorianSchandinat@gmx.de
Cc: linux-arm-kernel@lists.infradead.org,
linux-fbdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Subject: [PATCH 5/9] s3c2410fb: Use dev_pm_ops
Date: Fri, 26 Apr 2013 22:02:19 +0200 [thread overview]
Message-ID: <1367006543-5458-6-git-send-email-sylvester.nawrocki@gmail.com> (raw)
In-Reply-To: <1367006543-5458-1-git-send-email-sylvester.nawrocki@gmail.com>
Use the driver PM ops rather than legacy suspend/resume callbacks.
Also use CONFIG_PM_SLEEP switch to compile in the system sleep
code instead of CONFIG_PM.
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
drivers/video/s3c2410fb.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index d6706f7..479ab45 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -26,6 +26,7 @@
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/pm.h>
#include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/io.h>
@@ -36,10 +37,6 @@
#include <asm/mach/map.h>
#include <mach/regs-gpio.h>
-#ifdef CONFIG_PM
-#include <linux/pm.h>
-#endif
-
#include "s3c2410fb.h"
/* Debugging stuff */
@@ -1044,8 +1041,7 @@ static int s3c2410fb_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
-
+#ifdef CONFIG_PM_SLEEP
/* suspend and resume support for the lcd controller */
static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state)
{
@@ -1081,9 +1077,14 @@ static int s3c2410fb_resume(struct platform_device *dev)
return 0;
}
+static const struct dev_pm_ops s3c2410fb_pm_ops = {
+ .resume = s3c2410fb_resume,
+ .suspend = s3c2410fb_suspend,
+};
+
+#define S3C2410FB_PM_OPS (&s3c2410fb_pm_ops)
#else
-#define s3c2410fb_suspend NULL
-#define s3c2410fb_resume NULL
+#define S3C2410FB_PM_OPS (NULL)
#endif
static struct platform_device_id s3c2410fb_driver_ids[] = {
@@ -1099,12 +1100,11 @@ static struct platform_device_id s3c2410fb_driver_ids[] = {
static struct platform_driver s3c2410fb_driver = {
.probe = s3c2410fb_probe,
.remove = s3c2410fb_remove,
- .suspend = s3c2410fb_suspend,
- .resume = s3c2410fb_resume,
.id_table = s3c2410fb_driver_ids,
.driver = {
.name = "s3c2410-lcd",
.owner = THIS_MODULE,
+ .pm = S3C2410FB_PM_OPS,
},
};
--
1.7.4.1
WARNING: multiple messages have this Message-ID (diff)
From: sylvester.nawrocki@gmail.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/9] s3c2410fb: Use dev_pm_ops
Date: Fri, 26 Apr 2013 22:02:19 +0200 [thread overview]
Message-ID: <1367006543-5458-6-git-send-email-sylvester.nawrocki@gmail.com> (raw)
In-Reply-To: <1367006543-5458-1-git-send-email-sylvester.nawrocki@gmail.com>
Use the driver PM ops rather than legacy suspend/resume callbacks.
Also use CONFIG_PM_SLEEP switch to compile in the system sleep
code instead of CONFIG_PM.
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
drivers/video/s3c2410fb.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index d6706f7..479ab45 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -26,6 +26,7 @@
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/pm.h>
#include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/io.h>
@@ -36,10 +37,6 @@
#include <asm/mach/map.h>
#include <mach/regs-gpio.h>
-#ifdef CONFIG_PM
-#include <linux/pm.h>
-#endif
-
#include "s3c2410fb.h"
/* Debugging stuff */
@@ -1044,8 +1041,7 @@ static int s3c2410fb_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
-
+#ifdef CONFIG_PM_SLEEP
/* suspend and resume support for the lcd controller */
static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state)
{
@@ -1081,9 +1077,14 @@ static int s3c2410fb_resume(struct platform_device *dev)
return 0;
}
+static const struct dev_pm_ops s3c2410fb_pm_ops = {
+ .resume = s3c2410fb_resume,
+ .suspend = s3c2410fb_suspend,
+};
+
+#define S3C2410FB_PM_OPS (&s3c2410fb_pm_ops)
#else
-#define s3c2410fb_suspend NULL
-#define s3c2410fb_resume NULL
+#define S3C2410FB_PM_OPS (NULL)
#endif
static struct platform_device_id s3c2410fb_driver_ids[] = {
@@ -1099,12 +1100,11 @@ static struct platform_device_id s3c2410fb_driver_ids[] = {
static struct platform_driver s3c2410fb_driver = {
.probe = s3c2410fb_probe,
.remove = s3c2410fb_remove,
- .suspend = s3c2410fb_suspend,
- .resume = s3c2410fb_resume,
.id_table = s3c2410fb_driver_ids,
.driver = {
.name = "s3c2410-lcd",
.owner = THIS_MODULE,
+ .pm = S3C2410FB_PM_OPS,
},
};
--
1.7.4.1
next prev parent reply other threads:[~2013-04-26 20:02 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 20:02 [PATCH 0/9] s3c24xx LCD controller driver cleanup Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` [PATCH 1/9] s3c2410fb: Move platform data declarations to include/linux/platform_data Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` [PATCH 2/9] s3c2410fb: Make most of register definitions local Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` [PATCH 3/9] ARM: S3C24XX: Remove include/mach/regs-lcd.h header file Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` [PATCH 4/9] s3c2410fb: Register single platform driver Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki [this message]
2013-04-26 20:02 ` [PATCH 5/9] s3c2410fb: Use dev_pm_ops Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` [PATCH 6/9] s3c2410fb: Enable display by default Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` [PATCH 7/9] s3c2410fb: Use devm_ioremap_resource() Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` [PATCH 8/9] s3c2410fb: Remove redundant platform_set_drvdata() Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-05-02 5:31 ` Jingoo Han
2013-05-02 5:31 ` Jingoo Han
2013-05-02 5:31 ` Jingoo Han
2013-05-02 20:11 ` Sylwester Nawrocki
2013-05-02 20:11 ` Sylwester Nawrocki
2013-05-02 20:11 ` Sylwester Nawrocki
2013-04-26 20:02 ` [PATCH 9/9] s3c2410fb: Use module parameter instead of a sysfs entry Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
2013-04-26 20:02 ` Sylwester Nawrocki
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=1367006543-5458-6-git-send-email-sylvester.nawrocki@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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 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.