aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-10-28 04:05:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-11-14 14:55:32 -0500
commit6a4b09f807afab788b58b529c4a9d6dc27cc6933 (patch)
tree30d3085facc5a5a06eb05cf86a92a4728303ce2a /drivers/net/wireless/iwlwifi/pcie
parent0f01545346cd97f823fc0aaf0c02d4fc7bec6d46 (diff)
wireless: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
dev_<level> calls take less code than dev_printk(KERN_<LEVEL> and reducing object size is good. Coalesce formats for easier grep. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index f95d88df7772..4d9dfa7de4ec 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -699,13 +699,11 @@ static void iwl_apm_config(struct iwl_trans *trans)
699 PCI_CFG_LINK_CTRL_VAL_L1_EN) { 699 PCI_CFG_LINK_CTRL_VAL_L1_EN) {
700 /* L1-ASPM enabled; disable(!) L0S */ 700 /* L1-ASPM enabled; disable(!) L0S */
701 iwl_set_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED); 701 iwl_set_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
702 dev_printk(KERN_INFO, trans->dev, 702 dev_info(trans->dev, "L1 Enabled; Disabling L0S\n");
703 "L1 Enabled; Disabling L0S\n");
704 } else { 703 } else {
705 /* L1-ASPM disabled; enable(!) L0S */ 704 /* L1-ASPM disabled; enable(!) L0S */
706 iwl_clear_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED); 705 iwl_clear_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
707 dev_printk(KERN_INFO, trans->dev, 706 dev_info(trans->dev, "L1 Disabled; Enabling L0S\n");
708 "L1 Disabled; Enabling L0S\n");
709 } 707 }
710 trans->pm_support = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); 708 trans->pm_support = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN);
711} 709}
@@ -2150,34 +2148,29 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
2150 DMA_BIT_MASK(32)); 2148 DMA_BIT_MASK(32));
2151 /* both attempts failed: */ 2149 /* both attempts failed: */
2152 if (err) { 2150 if (err) {
2153 dev_printk(KERN_ERR, &pdev->dev, 2151 dev_err(&pdev->dev, "No suitable DMA available\n");
2154 "No suitable DMA available.\n");
2155 goto out_pci_disable_device; 2152 goto out_pci_disable_device;
2156 } 2153 }
2157 } 2154 }
2158 2155
2159 err = pci_request_regions(pdev, DRV_NAME); 2156 err = pci_request_regions(pdev, DRV_NAME);
2160 if (err) { 2157 if (err) {
2161 dev_printk(KERN_ERR, &pdev->dev, 2158 dev_err(&pdev->dev, "pci_request_regions failed\n");
2162 "pci_request_regions failed\n");
2163 goto out_pci_disable_device; 2159 goto out_pci_disable_device;
2164 } 2160 }
2165 2161
2166 trans_pcie->hw_base = pci_ioremap_bar(pdev, 0); 2162 trans_pcie->hw_base = pci_ioremap_bar(pdev, 0);
2167 if (!trans_pcie->hw_base) { 2163 if (!trans_pcie->hw_base) {
2168 dev_printk(KERN_ERR, &pdev->dev, "pci_ioremap_bar failed\n"); 2164 dev_err(&pdev->dev, "pci_ioremap_bar failed\n");
2169 err = -ENODEV; 2165 err = -ENODEV;
2170 goto out_pci_release_regions; 2166 goto out_pci_release_regions;
2171 } 2167 }
2172 2168
2173 dev_printk(KERN_INFO, &pdev->dev, 2169 dev_info(&pdev->dev, "pci_resource_len = 0x%08llx\n",
2174 "pci_resource_len = 0x%08llx\n", 2170 (unsigned long long) pci_resource_len(pdev, 0));
2175 (unsigned long long) pci_resource_len(pdev, 0)); 2171 dev_info(&pdev->dev, "pci_resource_base = %p\n", trans_pcie->hw_base);
2176 dev_printk(KERN_INFO, &pdev->dev,
2177 "pci_resource_base = %p\n", trans_pcie->hw_base);
2178 2172
2179 dev_printk(KERN_INFO, &pdev->dev, 2173 dev_info(&pdev->dev, "HW Revision ID = 0x%X\n", pdev->revision);
2180 "HW Revision ID = 0x%X\n", pdev->revision);
2181 2174
2182 /* We disable the RETRY_TIMEOUT register (0x41) to keep 2175 /* We disable the RETRY_TIMEOUT register (0x41) to keep
2183 * PCI Tx retries from interfering with C3 CPU state */ 2176 * PCI Tx retries from interfering with C3 CPU state */
@@ -2185,8 +2178,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
2185 2178
2186 err = pci_enable_msi(pdev); 2179 err = pci_enable_msi(pdev);
2187 if (err) 2180 if (err)
2188 dev_printk(KERN_ERR, &pdev->dev, 2181 dev_err(&pdev->dev, "pci_enable_msi failed(0X%x)\n", err);
2189 "pci_enable_msi failed(0X%x)\n", err);
2190 2182
2191 trans->dev = &pdev->dev; 2183 trans->dev = &pdev->dev;
2192 trans_pcie->irq = pdev->irq; 2184 trans_pcie->irq = pdev->irq;