提交 c15797e6 编写于 作者: E Emmanuel Grumbach 提交者: John W. Linville

iwlwifi: use IWL_* instead of dev_printk when possible

Also remove a debug print when allocation error occurred.
The kernel will complain anyway.
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
上级 4d5ba61c
...@@ -1419,32 +1419,31 @@ void iwl_set_hw_params(struct iwl_priv *priv) ...@@ -1419,32 +1419,31 @@ void iwl_set_hw_params(struct iwl_priv *priv)
void iwl_debug_config(struct iwl_priv *priv) void iwl_debug_config(struct iwl_priv *priv)
{ {
dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEBUG " IWL_INFO(priv, "CONFIG_IWLWIFI_DEBUG "
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
"enabled\n"); "enabled\n");
#else #else
"disabled\n"); "disabled\n");
#endif #endif
dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEBUGFS " IWL_INFO(priv, "CONFIG_IWLWIFI_DEBUGFS "
#ifdef CONFIG_IWLWIFI_DEBUGFS #ifdef CONFIG_IWLWIFI_DEBUGFS
"enabled\n"); "enabled\n");
#else #else
"disabled\n"); "disabled\n");
#endif #endif
dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEVICE_TRACING " IWL_INFO(priv, "CONFIG_IWLWIFI_DEVICE_TRACING "
#ifdef CONFIG_IWLWIFI_DEVICE_TRACING #ifdef CONFIG_IWLWIFI_DEVICE_TRACING
"enabled\n"); "enabled\n");
#else #else
"disabled\n"); "disabled\n");
#endif #endif
IWL_INFO(priv, "CONFIG_IWLWIFI_DEVICE_TESTMODE "
dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEVICE_TESTMODE "
#ifdef CONFIG_IWLWIFI_DEVICE_TESTMODE #ifdef CONFIG_IWLWIFI_DEVICE_TESTMODE
"enabled\n"); "enabled\n");
#else #else
"disabled\n"); "disabled\n");
#endif #endif
dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_P2P " IWL_INFO(priv, "CONFIG_IWLWIFI_P2P "
#ifdef CONFIG_IWLWIFI_P2P #ifdef CONFIG_IWLWIFI_P2P
"enabled\n"); "enabled\n");
#else #else
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
#include <linux/module.h> #include <linux/module.h>
#include "iwl-drv.h" #include "iwl-drv.h"
#include "iwl-debug.h"
#include "iwl-trans.h" #include "iwl-trans.h"
#include "iwl-op-mode.h" #include "iwl-op-mode.h"
#include "iwl-agn-hw.h" #include "iwl-agn-hw.h"
...@@ -892,10 +893,9 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans, ...@@ -892,10 +893,9 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
int ret; int ret;
drv = kzalloc(sizeof(*drv), GFP_KERNEL); drv = kzalloc(sizeof(*drv), GFP_KERNEL);
if (!drv) { if (!drv)
dev_printk(KERN_ERR, trans->dev, "Couldn't allocate iwl_drv");
return NULL; return NULL;
}
drv->trans = trans; drv->trans = trans;
drv->dev = trans->dev; drv->dev = trans->dev;
drv->cfg = cfg; drv->cfg = cfg;
...@@ -905,7 +905,7 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans, ...@@ -905,7 +905,7 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
ret = iwl_request_firmware(drv, true); ret = iwl_request_firmware(drv, true);
if (ret) { if (ret) {
dev_printk(KERN_ERR, trans->dev, "Couldn't request the fw"); IWL_ERR(trans, "Couldn't request the fw\n");
kfree(drv); kfree(drv);
drv = NULL; drv = NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册