linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net/fec: clean suspend/resume
@ 2010-06-18 14:19 Eric Bénard
  2010-06-18 14:19 ` [PATCH 2/2] mach-cpuimx27: fix USB_ULPI build warnings Eric Bénard
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Bénard @ 2010-06-18 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

Commit 59d4289b83b11379d867e2f7146904b19cc96404 converted fec to dev_pm_ops but
didn't update the suspend/resume functions thus leading to the following warning :
"initialization from incompatible pointer type" when CONFIG_PM is set.

This patch also fixe a few indentation and style around CONFIG_PM area.

Signed-off-by: Eric B?nard <eric@eukrea.com>
Cc: netdev at vger.kernel.org
Cc: davem at davemloft.net
Cc: amit.kucheria at canonical.com
Cc: s.hauer at pengutronix.de
Cc: linux-arm-kernel at lists.infradead.org
---
 drivers/net/fec.c |   30 ++++++++++++------------------
 1 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index a3cae4e..b4afd7a 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1360,11 +1360,10 @@ fec_drv_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-
 static int
-fec_suspend(struct platform_device *dev, pm_message_t state)
+fec_suspend(struct device *dev)
 {
-	struct net_device *ndev = platform_get_drvdata(dev);
+	struct net_device *ndev = dev_get_drvdata(dev);
 	struct fec_enet_private *fep;
 
 	if (ndev) {
@@ -1377,9 +1376,9 @@ fec_suspend(struct platform_device *dev, pm_message_t state)
 }
 
 static int
-fec_resume(struct platform_device *dev)
+fec_resume(struct device *dev)
 {
-	struct net_device *ndev = platform_get_drvdata(dev);
+	struct net_device *ndev = dev_get_drvdata(dev);
 	struct fec_enet_private *fep;
 
 	if (ndev) {
@@ -1399,23 +1398,18 @@ static const struct dev_pm_ops fec_pm_ops = {
 	.poweroff	= fec_suspend,
 	.restore	= fec_resume,
 };
-
-#define FEC_PM_OPS (&fec_pm_ops)
-
-#else /* !CONFIG_PM */
-
-#define FEC_PM_OPS NULL
-
-#endif /* !CONFIG_PM */
+#endif
 
 static struct platform_driver fec_driver = {
 	.driver	= {
-		.name    = "fec",
-		.owner	 = THIS_MODULE,
-		.pm		 = FEC_PM_OPS,
+		.name	= "fec",
+		.owner	= THIS_MODULE,
+#ifdef CONFIG_PM
+		.pm	= &fec_pm_ops,
+#endif
 	},
-	.probe   = fec_probe,
-	.remove  = __devexit_p(fec_drv_remove),
+	.probe	= fec_probe,
+	.remove	= __devexit_p(fec_drv_remove),
 };
 
 static int __init
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] mach-cpuimx27: fix USB_ULPI build warnings
  2010-06-18 14:19 [PATCH 1/2] net/fec: clean suspend/resume Eric Bénard
@ 2010-06-18 14:19 ` Eric Bénard
  2010-06-21  6:51   ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Bénard @ 2010-06-18 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

when CONFIG_USB_ULPI is not defined we actually get :
warning: 'otg_pdata' defined but not used
warning: 'usbh2_pdata' defined but not used

Signed-off-by: Eric B?nard <eric@eukrea.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: s.hauer at pengutronix.de
---
 arch/arm/mach-mx2/mach-cpuimx27.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx2/mach-cpuimx27.c b/arch/arm/mach-mx2/mach-cpuimx27.c
index dc2dca3..5529178 100644
--- a/arch/arm/mach-mx2/mach-cpuimx27.c
+++ b/arch/arm/mach-mx2/mach-cpuimx27.c
@@ -219,6 +219,7 @@ static struct platform_device serial_device = {
 };
 #endif
 
+#if defined(CONFIG_USB_ULPI)
 static struct mxc_usbh_platform_data otg_pdata = {
 	.portsc	= MXC_EHCI_MODE_ULPI,
 	.flags	= MXC_EHCI_INTERFACE_DIFF_UNI,
@@ -228,6 +229,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = {
 	.portsc	= MXC_EHCI_MODE_ULPI,
 	.flags	= MXC_EHCI_INTERFACE_DIFF_UNI,
 };
+#endif
 
 static struct fsl_usb2_platform_data otg_device_pdata = {
 	.operating_mode = FSL_USB2_DR_DEVICE,
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] mach-cpuimx27: fix USB_ULPI build warnings
  2010-06-18 14:19 ` [PATCH 2/2] mach-cpuimx27: fix USB_ULPI build warnings Eric Bénard
@ 2010-06-21  6:51   ` Sascha Hauer
  0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2010-06-21  6:51 UTC (permalink / raw)
  To: linux-arm-kernel


On Fri, Jun 18, 2010 at 04:19:55PM +0200, Eric B?nard wrote:
> when CONFIG_USB_ULPI is not defined we actually get :
> warning: 'otg_pdata' defined but not used
> warning: 'usbh2_pdata' defined but not used

Ok, applied.

> 
> Signed-off-by: Eric B?nard <eric@eukrea.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: s.hauer at pengutronix.de
> ---
>  arch/arm/mach-mx2/mach-cpuimx27.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-mx2/mach-cpuimx27.c b/arch/arm/mach-mx2/mach-cpuimx27.c
> index dc2dca3..5529178 100644
> --- a/arch/arm/mach-mx2/mach-cpuimx27.c
> +++ b/arch/arm/mach-mx2/mach-cpuimx27.c
> @@ -219,6 +219,7 @@ static struct platform_device serial_device = {
>  };
>  #endif
>  
> +#if defined(CONFIG_USB_ULPI)
>  static struct mxc_usbh_platform_data otg_pdata = {
>  	.portsc	= MXC_EHCI_MODE_ULPI,
>  	.flags	= MXC_EHCI_INTERFACE_DIFF_UNI,
> @@ -228,6 +229,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = {
>  	.portsc	= MXC_EHCI_MODE_ULPI,
>  	.flags	= MXC_EHCI_INTERFACE_DIFF_UNI,
>  };
> +#endif
>  
>  static struct fsl_usb2_platform_data otg_device_pdata = {
>  	.operating_mode = FSL_USB2_DR_DEVICE,
> -- 
> 1.6.3.3
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-21  6:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-18 14:19 [PATCH 1/2] net/fec: clean suspend/resume Eric Bénard
2010-06-18 14:19 ` [PATCH 2/2] mach-cpuimx27: fix USB_ULPI build warnings Eric Bénard
2010-06-21  6:51   ` Sascha Hauer

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).