Skip to content

Commit

Permalink
fec: Fix the build as module
Browse files Browse the repository at this point in the history
[ Upstream commit 9d73adf ]

Since commit ff43da8 (NET: FEC: dynamtic check DMA desc buff type) the
following build error happens when CONFIG_FEC=m

ERROR: "fec_ptp_init" [drivers/net/ethernet/freescale/fec.ko] undefined!
ERROR: "fec_ptp_ioctl" [drivers/net/ethernet/freescale/fec.ko] undefined!
ERROR: "fec_ptp_start_cyclecounter" [drivers/net/ethernet/freescale/fec.ko] undefined!

Fix it by exporting the required fec_ptp symbols.

Reported-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Fabio Estevam authored and gregkh committed Apr 5, 2013
1 parent 43d5537 commit 7afda2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/freescale/fec_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ void fec_ptp_start_cyclecounter(struct net_device *ndev)

spin_unlock_irqrestore(&fep->tmreg_lock, flags);
}
EXPORT_SYMBOL(fec_ptp_start_cyclecounter);

/**
* fec_ptp_adjfreq - adjust ptp cycle frequency
Expand Down Expand Up @@ -318,6 +319,7 @@ int fec_ptp_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ?
-EFAULT : 0;
}
EXPORT_SYMBOL(fec_ptp_ioctl);

/**
* fec_time_keep - call timecounter_read every second to avoid timer overrun
Expand Down Expand Up @@ -381,3 +383,4 @@ void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev)
pr_info("registered PHC device on %s\n", ndev->name);
}
}
EXPORT_SYMBOL(fec_ptp_init);

0 comments on commit 7afda2f

Please sign in to comment.