* [PATCH 1/2] pinctrl: nomadik: Silence compiler warn for !CONFIG_PM
@ 2014-02-12 12:59 Ulf Hansson
2014-02-12 12:59 ` [PATCH 2/2] pinctrl: nomadik: Convert to modern pm_ops Ulf Hansson
2014-02-24 9:58 ` [PATCH 1/2] pinctrl: nomadik: Silence compiler warn for !CONFIG_PM Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Ulf Hansson @ 2014-02-12 12:59 UTC (permalink / raw)
To: linux-arm-kernel
The static suspend/resume functions were not being used while
!CONFIG_PM. Fix it and convert to CONFIG_PM_SLEEP.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/pinctrl/pinctrl-nomadik.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index 53a1111..b6c5793 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -2035,6 +2035,7 @@ static const struct of_device_id nmk_pinctrl_match[] = {
{},
};
+#ifdef CONFIG_PM_SLEEP
static int nmk_pinctrl_suspend(struct platform_device *pdev, pm_message_t state)
{
struct nmk_pinctrl *npct;
@@ -2056,6 +2057,7 @@ static int nmk_pinctrl_resume(struct platform_device *pdev)
return pinctrl_force_default(npct->pctl);
}
+#endif
static int nmk_pinctrl_probe(struct platform_device *pdev)
{
@@ -2151,7 +2153,7 @@ static struct platform_driver nmk_pinctrl_driver = {
.of_match_table = nmk_pinctrl_match,
},
.probe = nmk_pinctrl_probe,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
.suspend = nmk_pinctrl_suspend,
.resume = nmk_pinctrl_resume,
#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] pinctrl: nomadik: Convert to modern pm_ops
2014-02-12 12:59 [PATCH 1/2] pinctrl: nomadik: Silence compiler warn for !CONFIG_PM Ulf Hansson
@ 2014-02-12 12:59 ` Ulf Hansson
2014-02-24 9:59 ` Linus Walleij
2014-02-24 9:58 ` [PATCH 1/2] pinctrl: nomadik: Silence compiler warn for !CONFIG_PM Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Ulf Hansson @ 2014-02-12 12:59 UTC (permalink / raw)
To: linux-arm-kernel
Use the SIMPLE_DEV_PM_OPS macro and convert to the modern pm ops.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/pinctrl/pinctrl-nomadik.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index b6c5793..cec7762 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -2036,22 +2036,22 @@ static const struct of_device_id nmk_pinctrl_match[] = {
};
#ifdef CONFIG_PM_SLEEP
-static int nmk_pinctrl_suspend(struct platform_device *pdev, pm_message_t state)
+static int nmk_pinctrl_suspend(struct device *dev)
{
struct nmk_pinctrl *npct;
- npct = platform_get_drvdata(pdev);
+ npct = dev_get_drvdata(dev);
if (!npct)
return -EINVAL;
return pinctrl_force_sleep(npct->pctl);
}
-static int nmk_pinctrl_resume(struct platform_device *pdev)
+static int nmk_pinctrl_resume(struct device *dev)
{
struct nmk_pinctrl *npct;
- npct = platform_get_drvdata(pdev);
+ npct = dev_get_drvdata(dev);
if (!npct)
return -EINVAL;
@@ -2146,17 +2146,18 @@ static struct platform_driver nmk_gpio_driver = {
.probe = nmk_gpio_probe,
};
+static SIMPLE_DEV_PM_OPS(nmk_pinctrl_pm_ops,
+ nmk_pinctrl_suspend,
+ nmk_pinctrl_resume);
+
static struct platform_driver nmk_pinctrl_driver = {
.driver = {
.owner = THIS_MODULE,
.name = "pinctrl-nomadik",
.of_match_table = nmk_pinctrl_match,
+ .pm = &nmk_pinctrl_pm_ops,
},
.probe = nmk_pinctrl_probe,
-#ifdef CONFIG_PM_SLEEP
- .suspend = nmk_pinctrl_suspend,
- .resume = nmk_pinctrl_resume,
-#endif
};
static int __init nmk_gpio_init(void)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 1/2] pinctrl: nomadik: Silence compiler warn for !CONFIG_PM
2014-02-12 12:59 [PATCH 1/2] pinctrl: nomadik: Silence compiler warn for !CONFIG_PM Ulf Hansson
2014-02-12 12:59 ` [PATCH 2/2] pinctrl: nomadik: Convert to modern pm_ops Ulf Hansson
@ 2014-02-24 9:58 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2014-02-24 9:58 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Feb 12, 2014 at 1:59 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> The static suspend/resume functions were not being used while
> !CONFIG_PM. Fix it and convert to CONFIG_PM_SLEEP.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Patch applied. Sorry for the delay.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-24 9:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-12 12:59 [PATCH 1/2] pinctrl: nomadik: Silence compiler warn for !CONFIG_PM Ulf Hansson
2014-02-12 12:59 ` [PATCH 2/2] pinctrl: nomadik: Convert to modern pm_ops Ulf Hansson
2014-02-24 9:59 ` Linus Walleij
2014-02-24 9:58 ` [PATCH 1/2] pinctrl: nomadik: Silence compiler warn for !CONFIG_PM Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).