iwlwifi: use IWL_* instead of dev_printk when possible
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 19 Apr 2012 07:29:58 +0000 (10:29 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 May 2012 00:56:09 +0000 (20:56 -0400)
Also remove a debug print when allocation error occurred.
The kernel will complain anyway.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-drv.c

index 8bd9610a5d685e64363a546cd8726616c43a2863..ee47b3fcf891b4b6efd4cfb929d9f371a1263d68 100644 (file)
@@ -1419,32 +1419,31 @@ void iwl_set_hw_params(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
                "enabled\n");
 #else
                "disabled\n");
 #endif
-       dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEBUGFS "
+       IWL_INFO(priv, "CONFIG_IWLWIFI_DEBUGFS "
 #ifdef CONFIG_IWLWIFI_DEBUGFS
                "enabled\n");
 #else
                "disabled\n");
 #endif
-       dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEVICE_TRACING "
+       IWL_INFO(priv, "CONFIG_IWLWIFI_DEVICE_TRACING "
 #ifdef CONFIG_IWLWIFI_DEVICE_TRACING
                "enabled\n");
 #else
                "disabled\n");
 #endif
-
-       dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_DEVICE_TESTMODE "
+       IWL_INFO(priv, "CONFIG_IWLWIFI_DEVICE_TESTMODE "
 #ifdef CONFIG_IWLWIFI_DEVICE_TESTMODE
                "enabled\n");
 #else
                "disabled\n");
 #endif
-       dev_printk(KERN_INFO, priv->trans->dev, "CONFIG_IWLWIFI_P2P "
+       IWL_INFO(priv, "CONFIG_IWLWIFI_P2P "
 #ifdef CONFIG_IWLWIFI_P2P
                "enabled\n");
 #else
index 05302d6f989f245837031801e27c129672f97edd..430cca56a7e748ea2b874c389b7ff02b8865e1a3 100644 (file)
@@ -66,6 +66,7 @@
 #include <linux/module.h>
 
 #include "iwl-drv.h"
+#include "iwl-debug.h"
 #include "iwl-trans.h"
 #include "iwl-op-mode.h"
 #include "iwl-agn-hw.h"
@@ -892,10 +893,9 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
        int ret;
 
        drv = kzalloc(sizeof(*drv), GFP_KERNEL);
-       if (!drv) {
-               dev_printk(KERN_ERR, trans->dev, "Couldn't allocate iwl_drv");
+       if (!drv)
                return NULL;
-       }
+
        drv->trans = trans;
        drv->dev = trans->dev;
        drv->cfg = cfg;
@@ -905,7 +905,7 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
        ret = iwl_request_firmware(drv, true);
 
        if (ret) {
-               dev_printk(KERN_ERR, trans->dev, "Couldn't request the fw");
+               IWL_ERR(trans, "Couldn't request the fw\n");
                kfree(drv);
                drv = NULL;
        }