diff options
author | Madalin Bucur <madalin.bucur@freescale.com> | 2014-07-24 17:07:07 (GMT) |
---|---|---|
committer | Madalin Bucur <madalin.bucur@freescale.com> | 2015-02-25 16:26:51 (GMT) |
commit | 947855957fe341351f98d0f96f0ce16abb3f8489 (patch) | |
tree | 3bc1b4aa2f4dfc509559ead267445601ae6c7270 /drivers | |
parent | 396d2d5dc502057ed85b640873dc299ddc8c65fe (diff) | |
download | linux-fsl-qoriq-947855957fe341351f98d0f96f0ce16abb3f8489.tar.xz |
dpaa_eth: move debugfs init
DPAA Ethernet debugfs is initialized from the Ethernet driver.
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Change-Id: Ia42ee938286cede2e60837388f376b477bc28c62
Reviewed-on: http://git.am.freescale.net:8181/15293
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Cristian Bercaru <cristian.bercaru@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_debugfs.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.c | 8 |
3 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c b/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c index 1f22bd7..f7d5b2d 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c @@ -362,7 +362,7 @@ void dpa_netdev_debugfs_remove(struct net_device *net_dev) #endif } -static int __init dpa_debugfs_module_init(void) +int __init dpa_debugfs_module_init(void) { int _errno = 0; @@ -381,11 +381,7 @@ static int __init dpa_debugfs_module_init(void) return _errno; } -static void __exit dpa_debugfs_module_exit(void) +void __exit dpa_debugfs_module_exit(void) { debugfs_remove(dpa_debugfs_root); } - -module_init(dpa_debugfs_module_init); -module_exit(dpa_debugfs_module_exit); -MODULE_LICENSE("Dual BSD/GPL"); diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.h b/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.h index f82cde5..63d3542 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.h +++ b/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.h @@ -37,5 +37,7 @@ int dpa_netdev_debugfs_create(struct net_device *net_dev); void dpa_netdev_debugfs_remove(struct net_device *net_dev); +int __init dpa_debugfs_module_init(void); +void __exit dpa_debugfs_module_exit(void); #endif /* DPAA_DEBUGFS_H_ */ diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c index c979bd1..e0fad81 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -1135,6 +1135,10 @@ static int __init __cold dpa_load(void) pr_info(DPA_DESCRIPTION " (" VERSION ")\n"); +#ifdef CONFIG_FSL_DPAA_ETH_DEBUGFS + dpa_debugfs_module_init(); +#endif /* CONFIG_FSL_DPAA_ETH_DEBUGFS */ + /* initialise dpaa_eth mirror values */ dpa_rx_extra_headroom = fm_get_rx_extra_headroom(); dpa_max_frm = fm_get_max_frm(); @@ -1165,6 +1169,10 @@ static void __exit __cold dpa_unload(void) platform_driver_unregister(&dpa_driver); +#ifdef CONFIG_FSL_DPAA_ETH_DEBUGFS + dpa_debugfs_module_exit(); +#endif /* CONFIG_FSL_DPAA_ETH_DEBUGFS */ + pr_debug(KBUILD_MODNAME ": %s:%s() ->\n", KBUILD_BASENAME".c", __func__); } |