aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/nsp32.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/nsp32.c')
-rw-r--r--drivers/scsi/nsp32.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index bd337a914298..bfb4f49e125d 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -2866,8 +2866,7 @@ static int nsp32_detect(struct scsi_host_template *sht)
2866 */ 2866 */
2867 nsp32_do_bus_reset(data); 2867 nsp32_do_bus_reset(data);
2868 2868
2869 ret = request_irq(host->irq, do_nsp32_isr, 2869 ret = request_irq(host->irq, do_nsp32_isr, IRQF_SHARED, "nsp32", data);
2870 IRQF_SHARED | IRQF_SAMPLE_RANDOM, "nsp32", data);
2871 if (ret < 0) { 2870 if (ret < 0) {
2872 nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 " 2871 nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 "
2873 "SCSI PCI controller. Interrupt: %d", host->irq); 2872 "SCSI PCI controller. Interrupt: %d", host->irq);
@@ -2886,12 +2885,19 @@ static int nsp32_detect(struct scsi_host_template *sht)
2886 } 2885 }
2887 2886
2888#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) 2887#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
2889 scsi_add_host (host, &PCIDEV->dev); 2888 ret = scsi_add_host(host, &PCIDEV->dev);
2889 if (ret) {
2890 nsp32_msg(KERN_ERR, "failed to add scsi host");
2891 goto free_region;
2892 }
2890 scsi_scan_host(host); 2893 scsi_scan_host(host);
2891#endif 2894#endif
2892 pci_set_drvdata(PCIDEV, host); 2895 pci_set_drvdata(PCIDEV, host);
2893 return DETECT_OK; 2896 return DETECT_OK;
2894 2897
2898 free_region:
2899 release_region(host->io_port, host->n_io_port);
2900
2895 free_irq: 2901 free_irq:
2896 free_irq(host->irq, data); 2902 free_irq(host->irq, data);
2897 2903