From 87e5666c0722d5f4cad3560ab5c180c8bba62b8b Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Thu, 25 Aug 2011 23:10:50 -0700 Subject: iwlagn: transport handler can register debugfs entries Add a handler in iwl_trans_ops to allow it to add entries under debugfs dir given by the upper level. Signed-off-by: Emmanuel Grumbach Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-trans.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h') diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index 4a0c7867cb6e..a9b3157994e9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h @@ -63,6 +63,8 @@ #ifndef __iwl_trans_h__ #define __iwl_trans_h__ +#include + /*This file includes the declaration that are exported from the transport * layer */ @@ -98,6 +100,8 @@ struct iwl_shared; * layer shall not pass any Rx. * @free: release all the ressource for the transport layer itself such as * irq, tasklet etc... + * @dbgfs_register: add the dbgfs files under this directory. Files will be + * automatically deleted. */ struct iwl_trans_ops { @@ -128,6 +132,8 @@ struct iwl_trans_ops { void (*sync_irq)(struct iwl_priv *priv); void (*free)(struct iwl_priv *priv); + + int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir); }; /** @@ -232,6 +238,12 @@ static inline void iwl_trans_free(struct iwl_trans *trans) trans->ops->free(priv(trans)); } +static inline int iwl_trans_dbgfs_register(struct iwl_trans *trans, + struct dentry *dir) +{ + return trans->ops->dbgfs_register(trans, dir); +} + /***************************************************** * Transport layers implementations ******************************************************/ -- cgit v1.2.3