* [PATCH] fec: Only pass pdev in fec_ptp_init()
@ 2013-06-07 20:48 Fabio Estevam
2013-06-07 21:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2013-06-07 20:48 UTC (permalink / raw)
To: davem; +Cc: Frank.Li, netdev, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
Passing pdev in fec_ptp_init() is enough, since we can get ndev locally.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/net/ethernet/freescale/fec.h | 2 +-
drivers/net/ethernet/freescale/fec_main.c | 2 +-
drivers/net/ethernet/freescale/fec_ptp.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index b11cdbc..e3ed6c5 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -275,7 +275,7 @@ struct fec_enet_private {
struct regulator *reg_phy;
};
-void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev);
+void fec_ptp_init(struct platform_device *pdev);
void fec_ptp_start_cyclecounter(struct net_device *ndev);
int fec_ptp_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd);
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index c42c42a..fa4a68f 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1945,7 +1945,7 @@ fec_probe(struct platform_device *pdev)
fec_reset_phy(pdev);
if (fep->bufdesc_ex)
- fec_ptp_init(ndev, pdev);
+ fec_ptp_init(pdev);
ret = fec_enet_init(ndev);
if (ret)
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 25fc960..5007e4f 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -347,8 +347,9 @@ static void fec_time_keep(unsigned long _data)
* cyclecounter init routine and exits.
*/
-void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev)
+void fec_ptp_init(struct platform_device *pdev)
{
+ struct net_device *ndev = platform_get_drvdata(pdev);
struct fec_enet_private *fep = netdev_priv(ndev);
fep->ptp_caps.owner = THIS_MODULE;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fec: Only pass pdev in fec_ptp_init()
2013-06-07 20:48 [PATCH] fec: Only pass pdev in fec_ptp_init() Fabio Estevam
@ 2013-06-07 21:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-06-07 21:41 UTC (permalink / raw)
To: festevam; +Cc: Frank.Li, netdev, fabio.estevam
From: Fabio Estevam <festevam@gmail.com>
Date: Fri, 7 Jun 2013 17:48:00 -0300
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Passing pdev in fec_ptp_init() is enough, since we can get ndev locally.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-07 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-07 20:48 [PATCH] fec: Only pass pdev in fec_ptp_init() Fabio Estevam
2013-06-07 21:41 ` David Miller
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).