hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/scsi/pm8001/pm8001_init.c
....@@ -255,7 +255,6 @@
255255 return ret;
256256 }
257257
258
-static u32 pm8001_setup_irq(struct pm8001_hba_info *pm8001_ha);
259258 static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha);
260259
261260 /**
....@@ -275,13 +274,6 @@
275274 pm8001_dbg(pm8001_ha, INIT, "pm8001_alloc: PHY:%x\n",
276275 pm8001_ha->chip->n_phy);
277276
278
- /* Setup Interrupt */
279
- rc = pm8001_setup_irq(pm8001_ha);
280
- if (rc) {
281
- pm8001_dbg(pm8001_ha, FAIL,
282
- "pm8001_setup_irq failed [ret: %d]\n", rc);
283
- goto err_out;
284
- }
285277 /* Request Interrupt */
286278 rc = pm8001_request_irq(pm8001_ha);
287279 if (rc)
....@@ -990,47 +982,38 @@
990982 }
991983 #endif
992984
993
-static u32 pm8001_setup_irq(struct pm8001_hba_info *pm8001_ha)
994
-{
995
- struct pci_dev *pdev;
996
-
997
- pdev = pm8001_ha->pdev;
998
-
999
-#ifdef PM8001_USE_MSIX
1000
- if (pci_find_capability(pdev, PCI_CAP_ID_MSIX))
1001
- return pm8001_setup_msix(pm8001_ha);
1002
- pm8001_dbg(pm8001_ha, INIT, "MSIX not supported!!!\n");
1003
-#endif
1004
- return 0;
1005
-}
1006
-
1007985 /**
1008986 * pm8001_request_irq - register interrupt
1009987 * @pm8001_ha: our ha struct.
1010988 */
1011989 static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha)
1012990 {
1013
- struct pci_dev *pdev;
991
+ struct pci_dev *pdev = pm8001_ha->pdev;
992
+#ifdef PM8001_USE_MSIX
1014993 int rc;
1015994
1016
- pdev = pm8001_ha->pdev;
995
+ if (pci_find_capability(pdev, PCI_CAP_ID_MSIX)) {
996
+ rc = pm8001_setup_msix(pm8001_ha);
997
+ if (rc) {
998
+ pm8001_dbg(pm8001_ha, FAIL,
999
+ "pm8001_setup_irq failed [ret: %d]\n", rc);
1000
+ return rc;
1001
+ }
10171002
1018
-#ifdef PM8001_USE_MSIX
1019
- if (pdev->msix_cap && pci_msi_enabled())
1020
- return pm8001_request_msix(pm8001_ha);
1021
- else {
1022
- pm8001_dbg(pm8001_ha, INIT, "MSIX not supported!!!\n");
1023
- goto intx;
1003
+ if (pdev->msix_cap && pci_msi_enabled())
1004
+ return pm8001_request_msix(pm8001_ha);
10241005 }
1006
+
1007
+ pm8001_dbg(pm8001_ha, INIT, "MSIX not supported!!!\n");
10251008 #endif
10261009
1027
-intx:
10281010 /* initialize the INT-X interrupt */
10291011 pm8001_ha->irq_vector[0].irq_id = 0;
10301012 pm8001_ha->irq_vector[0].drv_inst = pm8001_ha;
1031
- rc = request_irq(pdev->irq, pm8001_interrupt_handler_intx, IRQF_SHARED,
1032
- pm8001_ha->name, SHOST_TO_SAS_HA(pm8001_ha->shost));
1033
- return rc;
1013
+
1014
+ return request_irq(pdev->irq, pm8001_interrupt_handler_intx,
1015
+ IRQF_SHARED, pm8001_ha->name,
1016
+ SHOST_TO_SAS_HA(pm8001_ha->shost));
10341017 }
10351018
10361019 /**