* [PATCH 2/5] atl1: Remove unneeded PM_OPS definitions
2013-04-16 19:28 [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions Fabio Estevam
@ 2013-04-16 19:28 ` Fabio Estevam
2013-04-16 19:28 ` [PATCH 3/5] tg3: " Fabio Estevam
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2013-04-16 19:28 UTC (permalink / raw)
To: davem; +Cc: netdev, joe, Fabio Estevam, Jay Cliburn
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Cc: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/net/ethernet/atheros/atlx/atl1.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 9948fee..9843c70 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -2876,16 +2876,9 @@ static int atl1_resume(struct device *dev)
return 0;
}
+#endif
static SIMPLE_DEV_PM_OPS(atl1_pm_ops, atl1_suspend, atl1_resume);
-#define ATL1_PM_OPS (&atl1_pm_ops)
-
-#else
-
-static int atl1_suspend(struct device *dev) { return 0; }
-
-#define ATL1_PM_OPS NULL
-#endif
static void atl1_shutdown(struct pci_dev *pdev)
{
@@ -3147,7 +3140,7 @@ static struct pci_driver atl1_driver = {
.probe = atl1_probe,
.remove = atl1_remove,
.shutdown = atl1_shutdown,
- .driver.pm = ATL1_PM_OPS,
+ .driver.pm = &atl1_pm_ops,
};
/**
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/5] tg3: Remove unneeded PM_OPS definitions
2013-04-16 19:28 [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions Fabio Estevam
2013-04-16 19:28 ` [PATCH 2/5] atl1: " Fabio Estevam
@ 2013-04-16 19:28 ` Fabio Estevam
2013-04-16 19:28 ` [PATCH 4/5] xgmac: " Fabio Estevam
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2013-04-16 19:28 UTC (permalink / raw)
To: davem; +Cc: netdev, joe, Fabio Estevam, Nithin Nayak Sujir
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Cc: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/net/ethernet/broadcom/tg3.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index ce98572..45719dd 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -17533,15 +17533,9 @@ out:
return err;
}
+#endif /* CONFIG_PM_SLEEP */
static SIMPLE_DEV_PM_OPS(tg3_pm_ops, tg3_suspend, tg3_resume);
-#define TG3_PM_OPS (&tg3_pm_ops)
-
-#else
-
-#define TG3_PM_OPS NULL
-
-#endif /* CONFIG_PM_SLEEP */
/**
* tg3_io_error_detected - called when PCI error is detected
@@ -17689,7 +17683,7 @@ static struct pci_driver tg3_driver = {
.probe = tg3_init_one,
.remove = tg3_remove_one,
.err_handler = &tg3_err_handler,
- .driver.pm = TG3_PM_OPS,
+ .driver.pm = &tg3_pm_ops,
};
static int __init tg3_init(void)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] xgmac: Remove unneeded PM_OPS definitions
2013-04-16 19:28 [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions Fabio Estevam
2013-04-16 19:28 ` [PATCH 2/5] atl1: " Fabio Estevam
2013-04-16 19:28 ` [PATCH 3/5] tg3: " Fabio Estevam
@ 2013-04-16 19:28 ` Fabio Estevam
2013-04-16 19:28 ` [PATCH 5/5] ks8851: " Fabio Estevam
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2013-04-16 19:28 UTC (permalink / raw)
To: davem; +Cc: netdev, joe, Fabio Estevam
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/net/ethernet/calxeda/xgmac.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index b0ebc9f..791e5ff 100644
--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -1886,12 +1886,9 @@ static int xgmac_resume(struct device *dev)
return 0;
}
+#endif /* CONFIG_PM_SLEEP */
static SIMPLE_DEV_PM_OPS(xgmac_pm_ops, xgmac_suspend, xgmac_resume);
-#define XGMAC_PM_OPS (&xgmac_pm_ops)
-#else
-#define XGMAC_PM_OPS NULL
-#endif /* CONFIG_PM_SLEEP */
static const struct of_device_id xgmac_of_match[] = {
{ .compatible = "calxeda,hb-xgmac", },
@@ -1906,7 +1903,7 @@ static struct platform_driver xgmac_driver = {
},
.probe = xgmac_probe,
.remove = xgmac_remove,
- .driver.pm = XGMAC_PM_OPS,
+ .driver.pm = &xgmac_pm_ops,
};
module_platform_driver(xgmac_driver);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] ks8851: Remove unneeded PM_OPS definitions
2013-04-16 19:28 [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions Fabio Estevam
` (2 preceding siblings ...)
2013-04-16 19:28 ` [PATCH 4/5] xgmac: " Fabio Estevam
@ 2013-04-16 19:28 ` Fabio Estevam
2013-04-16 20:29 ` Lars-Peter Clausen
2013-04-16 19:42 ` [PATCH 1/5] can: mcp251x: " Marc Kleine-Budde
2013-04-16 20:38 ` David Miller
5 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2013-04-16 19:28 UTC (permalink / raw)
To: davem; +Cc: netdev, joe, Fabio Estevam, Lars-Peter Clausen
SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
Remove the unneeded definitions.
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/net/ethernet/micrel/ks8851.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index da64960..727b546a 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1391,13 +1391,9 @@ static int ks8851_resume(struct device *dev)
return 0;
}
+#endif
static SIMPLE_DEV_PM_OPS(ks8851_pm_ops, ks8851_suspend, ks8851_resume);
-#define KS8851_PM_OPS (&ks8851_pm_ops)
-
-#else
-#define KS8851_PM_OPS NULL
-#endif
static int ks8851_probe(struct spi_device *spi)
{
@@ -1536,7 +1532,7 @@ static struct spi_driver ks8851_driver = {
.driver = {
.name = "ks8851",
.owner = THIS_MODULE,
- .pm = KS8851_PM_OPS,
+ .pm = &ks8851_pm_ops,
},
.probe = ks8851_probe,
.remove = ks8851_remove,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ks8851: Remove unneeded PM_OPS definitions
2013-04-16 19:28 ` [PATCH 5/5] ks8851: " Fabio Estevam
@ 2013-04-16 20:29 ` Lars-Peter Clausen
2013-04-16 20:37 ` David Miller
0 siblings, 1 reply; 11+ messages in thread
From: Lars-Peter Clausen @ 2013-04-16 20:29 UTC (permalink / raw)
To: Fabio Estevam; +Cc: davem, netdev, joe
On 04/16/2013 09:28 PM, Fabio Estevam wrote:
> SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
> need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
>
> Remove the unneeded definitions.
>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
yea, but now you have the dev_pm_ops struct, even if pm is disabled.
- Lars
> ---
> drivers/net/ethernet/micrel/ks8851.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
> index da64960..727b546a 100644
> --- a/drivers/net/ethernet/micrel/ks8851.c
> +++ b/drivers/net/ethernet/micrel/ks8851.c
> @@ -1391,13 +1391,9 @@ static int ks8851_resume(struct device *dev)
>
> return 0;
> }
> +#endif
>
> static SIMPLE_DEV_PM_OPS(ks8851_pm_ops, ks8851_suspend, ks8851_resume);
> -#define KS8851_PM_OPS (&ks8851_pm_ops)
> -
> -#else
> -#define KS8851_PM_OPS NULL
> -#endif
>
> static int ks8851_probe(struct spi_device *spi)
> {
> @@ -1536,7 +1532,7 @@ static struct spi_driver ks8851_driver = {
> .driver = {
> .name = "ks8851",
> .owner = THIS_MODULE,
> - .pm = KS8851_PM_OPS,
> + .pm = &ks8851_pm_ops,
> },
> .probe = ks8851_probe,
> .remove = ks8851_remove,
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ks8851: Remove unneeded PM_OPS definitions
2013-04-16 20:29 ` Lars-Peter Clausen
@ 2013-04-16 20:37 ` David Miller
2013-04-17 6:27 ` Lars-Peter Clausen
0 siblings, 1 reply; 11+ messages in thread
From: David Miller @ 2013-04-16 20:37 UTC (permalink / raw)
To: lars; +Cc: fabio.estevam, netdev, joe
From: Lars-Peter Clausen <lars@metafoo.de>
Date: Tue, 16 Apr 2013 22:29:37 +0200
> On 04/16/2013 09:28 PM, Fabio Estevam wrote:
>> SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
>> need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
>>
>> Remove the unneeded definitions.
>>
>> Cc: Lars-Peter Clausen <lars@metafoo.de>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> yea, but now you have the dev_pm_ops struct, even if pm is disabled.
That's fine, it allows the functions to be compile tested in all
configurations.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] ks8851: Remove unneeded PM_OPS definitions
2013-04-16 20:37 ` David Miller
@ 2013-04-17 6:27 ` Lars-Peter Clausen
0 siblings, 0 replies; 11+ messages in thread
From: Lars-Peter Clausen @ 2013-04-17 6:27 UTC (permalink / raw)
To: David Miller; +Cc: fabio.estevam, netdev, joe
On 04/16/2013 10:37 PM, David Miller wrote:
> From: Lars-Peter Clausen <lars@metafoo.de>
> Date: Tue, 16 Apr 2013 22:29:37 +0200
>
>> On 04/16/2013 09:28 PM, Fabio Estevam wrote:
>>> SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
>>> need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
>>>
>>> Remove the unneeded definitions.
>>>
>>> Cc: Lars-Peter Clausen <lars@metafoo.de>
>>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> yea, but now you have the dev_pm_ops struct, even if pm is disabled.
>
> That's fine, it allows the functions to be compile tested in all
> configurations.
The functions are still protected by a #ifdef, it's just the dev_pm_ops struct
which is not anymore.
- Lars
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions
2013-04-16 19:28 [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions Fabio Estevam
` (3 preceding siblings ...)
2013-04-16 19:28 ` [PATCH 5/5] ks8851: " Fabio Estevam
@ 2013-04-16 19:42 ` Marc Kleine-Budde
2013-04-16 19:49 ` David Miller
2013-04-16 20:38 ` David Miller
5 siblings, 1 reply; 11+ messages in thread
From: Marc Kleine-Budde @ 2013-04-16 19:42 UTC (permalink / raw)
To: Fabio Estevam; +Cc: davem, netdev, joe
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
On 04/16/2013 09:28 PM, Fabio Estevam wrote:
> SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
> need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
>
> Remove the unneeded definitions.
>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
David, are you directly taking the whole series? If not, this patch will
go through the linux-can tree.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions
2013-04-16 19:42 ` [PATCH 1/5] can: mcp251x: " Marc Kleine-Budde
@ 2013-04-16 19:49 ` David Miller
0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2013-04-16 19:49 UTC (permalink / raw)
To: mkl; +Cc: fabio.estevam, netdev, joe
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Tue, 16 Apr 2013 21:42:13 +0200
> On 04/16/2013 09:28 PM, Fabio Estevam wrote:
>> SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
>> need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.
>>
>> Remove the unneeded definitions.
>>
>> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
>
> David, are you directly taking the whole series? If not, this patch will
> go through the linux-can tree.
I intend on taking it all in one gulp, thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions
2013-04-16 19:28 [PATCH 1/5] can: mcp251x: Remove unneeded PM_OPS definitions Fabio Estevam
` (4 preceding siblings ...)
2013-04-16 19:42 ` [PATCH 1/5] can: mcp251x: " Marc Kleine-Budde
@ 2013-04-16 20:38 ` David Miller
5 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2013-04-16 20:38 UTC (permalink / raw)
To: fabio.estevam; +Cc: netdev, joe, mkl
All 5 patches applied.
Please submit multi-patch sets with an initial "[PATCH 0/5] ..." email
so that you can explain the top-level purpose of the patch series and
also so that I can reply to that one if I apply them all.
^ permalink raw reply [flat|nested] 11+ messages in thread