* [PATCH] usb: dwc3-pci: Ensure system sleep PM ops are defined only when used
@ 2013-08-06 15:49 Mark Brown
2013-08-07 1:35 ` Fabio Estevam
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-08-06 15:49 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman
Cc: linux-usb, linaro-kernel, linux-omap, Andy Green, Mark Brown
From: Andy Green <andy.green@linaro.org>
You might have CONFIG_PM, but you might not have CONFIG_SUSPEND, in which
case these are unused.
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
---
drivers/usb/dwc3/dwc3-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 5d746e5..4902021 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -191,7 +191,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = {
};
MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table);
-#ifdef CONFIG_PM
+#ifdef CONFIG_SUSPEND
static int dwc3_pci_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
--
1.8.4.rc1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] usb: dwc3-pci: Ensure system sleep PM ops are defined only when used
2013-08-06 15:49 [PATCH] usb: dwc3-pci: Ensure system sleep PM ops are defined only when used Mark Brown
@ 2013-08-07 1:35 ` Fabio Estevam
2013-08-07 9:34 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2013-08-07 1:35 UTC (permalink / raw)
To: Mark Brown
Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linaro-kernel,
linux-omap, Andy Green, Mark Brown
Hi Mark,
On Tue, Aug 6, 2013 at 12:49 PM, Mark Brown <broonie@kernel.org> wrote:
> From: Andy Green <andy.green@linaro.org>
>
> You might have CONFIG_PM, but you might not have CONFIG_SUSPEND, in which
> case these are unused.
>
> Signed-off-by: Andy Green <andy.green@linaro.org>
> Signed-off-by: Mark Brown <broonie@linaro.org>
What about doing this instead?
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -191,7 +191,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = {
};
MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table);
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int dwc3_pci_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
@@ -216,15 +216,10 @@ static int dwc3_pci_resume(struct device *dev)
return 0;
}
+#endif /* CONFIG_PM_SLEEP */
-static const struct dev_pm_ops dwc3_pci_dev_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_suspend, dwc3_pci_resume)
-};
-
-#define DEV_PM_OPS (&dwc3_pci_dev_pm_ops)
-#else
-#define DEV_PM_OPS NULL
-#endif /* CONFIG_PM */
+static SIMPLE_DEV_PM_OPS(dwc3_pci_dev_pm_ops, dwc3_pci_suspend,
+ dwc3_pci_resume);
static struct pci_driver dwc3_pci_driver = {
.name = "dwc3-pci",
@@ -232,7 +227,7 @@ static struct pci_driver dwc3_pci_driver = {
.probe = dwc3_pci_probe,
.remove = dwc3_pci_remove,
.driver = {
- .pm = DEV_PM_OPS,
+ .pm = &dwc3_pci_dev_pm_ops,
},
};
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb: dwc3-pci: Ensure system sleep PM ops are defined only when used
2013-08-07 1:35 ` Fabio Estevam
@ 2013-08-07 9:34 ` Mark Brown
2013-08-07 10:01 ` Andy Green
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2013-08-07 9:34 UTC (permalink / raw)
To: Fabio Estevam
Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linaro-kernel,
linux-omap, Andy Green
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
On Tue, Aug 06, 2013 at 10:35:52PM -0300, Fabio Estevam wrote:
> On Tue, Aug 6, 2013 at 12:49 PM, Mark Brown <broonie@kernel.org> wrote:
> > From: Andy Green <andy.green@linaro.org>
> >
> > You might have CONFIG_PM, but you might not have CONFIG_SUSPEND, in which
> > case these are unused.
> >
> > Signed-off-by: Andy Green <andy.green@linaro.org>
> > Signed-off-by: Mark Brown <broonie@linaro.org>
> What about doing this instead?
Makes sense to me - Andy?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb: dwc3-pci: Ensure system sleep PM ops are defined only when used
2013-08-07 9:34 ` Mark Brown
@ 2013-08-07 10:01 ` Andy Green
2013-08-09 13:26 ` Felipe Balbi
0 siblings, 1 reply; 6+ messages in thread
From: Andy Green @ 2013-08-07 10:01 UTC (permalink / raw)
To: Mark Brown
Cc: Fabio Estevam, Felipe Balbi, Greg Kroah-Hartman, linux-usb,
linaro-kernel, linux-omap
On 7 August 2013 17:34, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Aug 06, 2013 at 10:35:52PM -0300, Fabio Estevam wrote:
>> On Tue, Aug 6, 2013 at 12:49 PM, Mark Brown <broonie@kernel.org> wrote:
>> > From: Andy Green <andy.green@linaro.org>
>> >
>> > You might have CONFIG_PM, but you might not have CONFIG_SUSPEND, in which
>> > case these are unused.
>> >
>> > Signed-off-by: Andy Green <andy.green@linaro.org>
>> > Signed-off-by: Mark Brown <broonie@linaro.org>
>
>> What about doing this instead?
>
> Makes sense to me - Andy?
Sure, it seems a much more complete solution.
-Andy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb: dwc3-pci: Ensure system sleep PM ops are defined only when used
2013-08-07 10:01 ` Andy Green
@ 2013-08-09 13:26 ` Felipe Balbi
2013-08-09 14:58 ` Fabio Estevam
0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2013-08-09 13:26 UTC (permalink / raw)
To: Andy Green
Cc: Mark Brown, Fabio Estevam, Felipe Balbi, Greg Kroah-Hartman,
linux-usb, linaro-kernel, linux-omap
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
On Wed, Aug 07, 2013 at 06:01:00PM +0800, Andy Green wrote:
> On 7 August 2013 17:34, Mark Brown <broonie@kernel.org> wrote:
> > On Tue, Aug 06, 2013 at 10:35:52PM -0300, Fabio Estevam wrote:
> >> On Tue, Aug 6, 2013 at 12:49 PM, Mark Brown <broonie@kernel.org> wrote:
> >> > From: Andy Green <andy.green@linaro.org>
> >> >
> >> > You might have CONFIG_PM, but you might not have CONFIG_SUSPEND, in which
> >> > case these are unused.
> >> >
> >> > Signed-off-by: Andy Green <andy.green@linaro.org>
> >> > Signed-off-by: Mark Brown <broonie@linaro.org>
> >
> >> What about doing this instead?
> >
> > Makes sense to me - Andy?
>
> Sure, it seems a much more complete solution.
looks good to me too, please send it as a real patch (if you already
have, sorry about that, catching up with my inbox now).
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb: dwc3-pci: Ensure system sleep PM ops are defined only when used
2013-08-09 13:26 ` Felipe Balbi
@ 2013-08-09 14:58 ` Fabio Estevam
0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2013-08-09 14:58 UTC (permalink / raw)
To: balbi
Cc: Andy Green, Mark Brown, Greg Kroah-Hartman, linux-usb,
linaro-kernel, linux-omap
On Fri, Aug 9, 2013 at 10:26 AM, Felipe Balbi <balbi@ti.com> wrote:
> looks good to me too, please send it as a real patch (if you already
> have, sorry about that, catching up with my inbox now).
Yes, I have already sent it as a formal patch.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-09 14:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06 15:49 [PATCH] usb: dwc3-pci: Ensure system sleep PM ops are defined only when used Mark Brown
2013-08-07 1:35 ` Fabio Estevam
2013-08-07 9:34 ` Mark Brown
2013-08-07 10:01 ` Andy Green
2013-08-09 13:26 ` Felipe Balbi
2013-08-09 14:58 ` Fabio Estevam
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.