Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1230812 > unrolled thread
| Started by | "Felipe F. Tonello" <eu@felipetonello.com> |
|---|---|
| First post | 2015-09-22 21:10 +0200 |
| Last post | 2015-09-22 23:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] usb: chipidea: core: fix when building without CONFIG_PM support "Felipe F. Tonello" <eu@felipetonello.com> - 2015-09-22 21:10 +0200
Re: [PATCH 1/3] usb: chipidea: core: fix when building without CONFIG_PM support Felipe Balbi <balbi@ti.com> - 2015-09-22 23:20 +0200
| From | "Felipe F. Tonello" <eu@felipetonello.com> |
|---|---|
| Date | 2015-09-22 21:10 +0200 |
| Subject | [PATCH 1/3] usb: chipidea: core: fix when building without CONFIG_PM support |
| Message-ID | <qbAXh-5tC-49@gated-at.bofh.it> |
If CONFIG_PM or CONFIG_PM_SLEEP is not set, driver will not compile
properly.
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
---
drivers/usb/chipidea/core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 3ad48e1..4182549 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -1009,18 +1009,22 @@ static int ci_runtime_resume(struct device *dev)
return ci_controller_resume(dev);
}
-#endif /* CONFIG_PM */
static const struct dev_pm_ops ci_pm_ops = {
+#ifdef CONFIG_PM_SLEEP
SET_SYSTEM_SLEEP_PM_OPS(ci_suspend, ci_resume)
+#endif /* CONFIG_PM_SLEEP */
SET_RUNTIME_PM_OPS(ci_runtime_suspend, ci_runtime_resume, NULL)
};
+#endif /* CONFIG_PM */
static struct platform_driver ci_hdrc_driver = {
.probe = ci_hdrc_probe,
.remove = ci_hdrc_remove,
.driver = {
.name = "ci_hdrc",
+#ifdef CONFIG_PM
.pm = &ci_pm_ops,
+#endif
},
};
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Felipe Balbi <balbi@ti.com> |
|---|---|
| Date | 2015-09-22 23:20 +0200 |
| Subject | Re: [PATCH 1/3] usb: chipidea: core: fix when building without CONFIG_PM support |
| Message-ID | <qbD8K-mn-5@gated-at.bofh.it> |
| In reply to | #1230812 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
On Tue, Sep 22, 2015 at 07:59:08PM +0100, Felipe F. Tonello wrote:
> If CONFIG_PM or CONFIG_PM_SLEEP is not set, driver will not compile
> properly.
>
> Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
> ---
> drivers/usb/chipidea/core.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 3ad48e1..4182549 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -1009,18 +1009,22 @@ static int ci_runtime_resume(struct device *dev)
> return ci_controller_resume(dev);
> }
>
> -#endif /* CONFIG_PM */
> static const struct dev_pm_ops ci_pm_ops = {
> +#ifdef CONFIG_PM_SLEEP
> SET_SYSTEM_SLEEP_PM_OPS(ci_suspend, ci_resume)
> +#endif /* CONFIG_PM_SLEEP */
NAK, this is not the right way to do it. Look at the definition of
SET_SYSTEM_SLEEP_PM_OPS() and other users in the kernel.
> SET_RUNTIME_PM_OPS(ci_runtime_suspend, ci_runtime_resume, NULL)
> };
> +#endif /* CONFIG_PM */
>
> static struct platform_driver ci_hdrc_driver = {
> .probe = ci_hdrc_probe,
> .remove = ci_hdrc_remove,
> .driver = {
> .name = "ci_hdrc",
> +#ifdef CONFIG_PM
> .pm = &ci_pm_ops,
> +#endif
> },
> };
>
> --
> 2.1.4
>
--
balbi
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web