From 418bb03b14f2a0c6f622d1091c2ff18c4bb35398 Mon Sep 17 00:00:00 2001 From: Marian-Cristian Rotariu Date: Thu, 22 Jan 2015 15:40:20 +0200 Subject: dpaa_eth: fix debugfs errors This patch removes one header dependency and attaches the debugfs directory of the DPAA Ethernet driver to the root directory of the debugfs. Signed-off-by: Marian-Cristian Rotariu Change-Id: Ib84fcbd86be7e9666ff8274c2aa52915771df988 Reviewed-on: http://git.am.freescale.net:8181/29106 Tested-by: Review Code-CDREVIEW Reviewed-by: Madalin-Cristian Bucur Reviewed-by: Mingkai Hu Reviewed-by: Yang Li Reviewed-on: http://git.am.freescale.net:8181/32504 diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c b/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c index f7d5b2d..ce63e187 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_debugfs.c @@ -32,7 +32,6 @@ #include #include /* struct qm_mcr_querycgr */ #include -#include #include "dpaa_debugfs.h" #include "dpaa_eth.h" /* struct dpa_priv_s, dpa_percpu_priv_s, dpa_bp */ @@ -325,8 +324,7 @@ int dpa_netdev_debugfs_create(struct net_device *net_dev) net_dev, &dpa_debugfs_fops); if (unlikely(priv->debugfs_file == NULL)) { - netdev_err(net_dev, "debugfs_create_file(%s/%s/%s)", - powerpc_debugfs_root->d_iname, + netdev_err(net_dev, "debugfs_create_file(%s/%s)", dpa_debugfs_root->d_iname, net_dev->name); @@ -341,8 +339,7 @@ int dpa_netdev_debugfs_create(struct net_device *net_dev) net_dev, &dpa_debugfs_lp_fops); if (unlikely(priv->debugfs_loop_file == NULL)) { - netdev_err(net_dev, "debugfs_create_file(%s/%s/%s)", - powerpc_debugfs_root->d_iname, + netdev_err(net_dev, "debugfs_create_file(%s/%s)", dpa_debugfs_root->d_iname, loop_file_name); @@ -368,14 +365,14 @@ int __init dpa_debugfs_module_init(void) pr_info(KBUILD_MODNAME ": " DPA_DEBUGFS_DESCRIPTION " (" VERSION ")\n"); - dpa_debugfs_root = debugfs_create_dir(DPA_ETH_DEBUGFS_ROOT, - powerpc_debugfs_root); + dpa_debugfs_root = debugfs_create_dir(DPA_ETH_DEBUGFS_ROOT, NULL); + if (unlikely(dpa_debugfs_root == NULL)) { _errno = -ENOMEM; pr_err(KBUILD_MODNAME ": %s:%hu:%s():\n", KBUILD_BASENAME".c", __LINE__, __func__); pr_err("\tdebugfs_create_dir(%s/"KBUILD_MODNAME") = %d\n", - powerpc_debugfs_root->d_iname, _errno); + DPA_ETH_DEBUGFS_ROOT, _errno); } return _errno; diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_generic_debugfs.c b/drivers/net/ethernet/freescale/dpa/dpaa_generic_debugfs.c index 79a6a96..2b655cd 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_generic_debugfs.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_generic_debugfs.c @@ -32,7 +32,6 @@ #include #include #include -#include #include "dpaa_eth_generic.h" @@ -236,8 +235,7 @@ int dpa_generic_debugfs_create(struct net_device *net_dev) net_dev, &dpa_debugfs_fops); if (unlikely(priv->debugfs_file == NULL)) { - netdev_err(net_dev, "debugfs_create_file(%s/%s/%s)", - powerpc_debugfs_root->d_iname, + netdev_err(net_dev, "debugfs_create_file(%s/%s)", dpa_debugfs_root->d_iname, net_dev->name); @@ -261,13 +259,13 @@ int __init dpa_generic_debugfs_module_init(void) pr_info(KBUILD_MODNAME ": " DPA_DEBUGFS_DESCRIPTION " (" VERSION ")\n"); dpa_debugfs_root = debugfs_create_dir(DPA_GENERIC_ETH_DEBUGFS_ROOT, - powerpc_debugfs_root); + NULL); if (unlikely(dpa_debugfs_root == NULL)) { _errno = -ENOMEM; pr_err(KBUILD_MODNAME ": %s:%hu:%s():\n", KBUILD_BASENAME".c", __LINE__, __func__); pr_err("\tdebugfs_create_dir(%s/"KBUILD_MODNAME") = %d\n", - powerpc_debugfs_root->d_iname, _errno); + DPA_GENERIC_ETH_DEBUGFS_ROOT, _errno); } return _errno; -- cgit v0.10.2