projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
usbmon: bus zero
[powerpc.git]
/
drivers
/
scsi
/
nsp32.c
diff --git
a/drivers/scsi/nsp32.c
b/drivers/scsi/nsp32.c
index
5c55e15
..
f6f561d
100644
(file)
--- a/
drivers/scsi/nsp32.c
+++ b/
drivers/scsi/nsp32.c
@@
-27,7
+27,6
@@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
@@
-256,7
+255,7
@@
static void nsp32_sack_negate (nsp32_hw_data *);
static void nsp32_do_bus_reset(nsp32_hw_data *);
/* hardware interrupt handler */
static void nsp32_do_bus_reset(nsp32_hw_data *);
/* hardware interrupt handler */
-static irqreturn_t do_nsp32_isr(int, void *
, struct pt_regs *
);
+static irqreturn_t do_nsp32_isr(int, void *);
/* initialize hardware */
static int nsp32hw_init(nsp32_hw_data *);
/* initialize hardware */
static int nsp32hw_init(nsp32_hw_data *);
@@
-1201,7
+1200,7
@@
static int nsp32hw_init(nsp32_hw_data *data)
/* interrupt routine */
/* interrupt routine */
-static irqreturn_t do_nsp32_isr(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t do_nsp32_isr(int irq, void *dev_id)
{
nsp32_hw_data *data = dev_id;
unsigned int base = data->BaseAddress;
{
nsp32_hw_data *data = dev_id;
unsigned int base = data->BaseAddress;
@@
-2866,8
+2865,7
@@
static int nsp32_detect(struct scsi_host_template *sht)
*/
nsp32_do_bus_reset(data);
*/
nsp32_do_bus_reset(data);
- ret = request_irq(host->irq, do_nsp32_isr,
- SA_SHIRQ | SA_SAMPLE_RANDOM, "nsp32", data);
+ ret = request_irq(host->irq, do_nsp32_isr, IRQF_SHARED, "nsp32", data);
if (ret < 0) {
nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 "
"SCSI PCI controller. Interrupt: %d", host->irq);
if (ret < 0) {
nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 "
"SCSI PCI controller. Interrupt: %d", host->irq);
@@
-2886,12
+2884,19
@@
static int nsp32_detect(struct scsi_host_template *sht)
}
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
}
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73))
- scsi_add_host (host, &PCIDEV->dev);
+ ret = scsi_add_host(host, &PCIDEV->dev);
+ if (ret) {
+ nsp32_msg(KERN_ERR, "failed to add scsi host");
+ goto free_region;
+ }
scsi_scan_host(host);
#endif
pci_set_drvdata(PCIDEV, host);
return DETECT_OK;
scsi_scan_host(host);
#endif
pci_set_drvdata(PCIDEV, host);
return DETECT_OK;
+ free_region:
+ release_region(host->io_port, host->n_io_port);
+
free_irq:
free_irq(host->irq, data);
free_irq:
free_irq(host->irq, data);
@@
-3575,7
+3580,7
@@
static struct pci_driver nsp32_driver = {
*/
static int __init init_nsp32(void) {
nsp32_msg(KERN_INFO, "loading...");
*/
static int __init init_nsp32(void) {
nsp32_msg(KERN_INFO, "loading...");
- return pci_
module_init
(&nsp32_driver);
+ return pci_
register_driver
(&nsp32_driver);
}
static void __exit exit_nsp32(void) {
}
static void __exit exit_nsp32(void) {