diff options
Diffstat (limited to 'drivers/scsi/arm/arxescsi.c')
| -rw-r--r-- | drivers/scsi/arm/arxescsi.c | 64 |
1 files changed, 14 insertions, 50 deletions
diff --git a/drivers/scsi/arm/arxescsi.c b/drivers/scsi/arm/arxescsi.c index a2894015670..32d23212de4 100644 --- a/drivers/scsi/arm/arxescsi.c +++ b/drivers/scsi/arm/arxescsi.c @@ -1,5 +1,5 @@ /* - * linux/arch/arm/drivers/scsi/arxescsi.c + * linux/drivers/scsi/arm/arxescsi.c * * Copyright (C) 1997-2000 Russell King, Stefan Hanske * @@ -23,7 +23,6 @@ #include <linux/kernel.h> #include <linux/string.h> #include <linux/ioport.h> -#include <linux/sched.h> #include <linux/proc_fs.h> #include <linux/unistd.h> #include <linux/stat.h> @@ -221,47 +220,21 @@ static const char *arxescsi_info(struct Scsi_Host *host) return string; } -/* - * Function: int arxescsi_proc_info(char *buffer, char **start, off_t offset, - * int length, int host_no, int inout) - * Purpose : Return information about the driver to a user process accessing - * the /proc filesystem. - * Params : buffer - a buffer to write information to - * start - a pointer into this buffer set by this routine to the start - * of the required information. - * offset - offset into information that we have read upto. - * length - length of buffer - * host_no - host number to return information for - * inout - 0 for reading, 1 for writing. - * Returns : length of data written to buffer. - */ static int -arxescsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, - int inout) +arxescsi_show_info(struct seq_file *m, struct Scsi_Host *host) { struct arxescsi_info *info; - char *p = buffer; - int pos; - info = (struct arxescsi_info *)host->hostdata; - if (inout == 1) - return -EINVAL; - - p += sprintf(p, "ARXE 16-bit SCSI driver v%s\n", VERSION); - p += fas216_print_host(&info->info, p); - p += fas216_print_stats(&info->info, p); - p += fas216_print_devices(&info->info, p); - *start = buffer + offset; - pos = p - buffer - offset; - if (pos > length) - pos = length; - - return pos; + seq_printf(m, "ARXE 16-bit SCSI driver v%s\n", VERSION); + fas216_print_host(&info->info, m); + fas216_print_stats(&info->info, m); + fas216_print_devices(&info->info, m); + return 0; } static struct scsi_host_template arxescsi_template = { - .proc_info = arxescsi_proc_info, + .show_info = arxescsi_show_info, .name = "ARXE SCSI card", .info = arxescsi_info, .queuecommand = fas216_noqueue_command, @@ -277,12 +250,10 @@ static struct scsi_host_template arxescsi_template = { .proc_name = "arxescsi", }; -static int __devinit -arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) +static int arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) { struct Scsi_Host *host; struct arxescsi_info *info; - unsigned long resbase, reslen; void __iomem *base; int ret; @@ -290,9 +261,7 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) if (ret) goto out; - resbase = ecard_resource_start(ec, ECARD_RES_MEMC); - reslen = ecard_resource_len(ec, ECARD_RES_MEMC); - base = ioremap(resbase, reslen); + base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0); if (!base) { ret = -ENOMEM; goto out_region; @@ -301,7 +270,7 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) host = scsi_host_alloc(&arxescsi_template, sizeof(struct arxescsi_info)); if (!host) { ret = -ENOMEM; - goto out_unmap; + goto out_region; } info = (struct arxescsi_info *)host->hostdata; @@ -309,7 +278,7 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) info->base = base; info->info.scsi.io_base = base + 0x2000; - info->info.scsi.irq = NO_IRQ; + info->info.scsi.irq = 0; info->info.scsi.dma = NO_DMA; info->info.scsi.io_shift = 5; info->info.ifcfg.clockrate = 24; /* MHz */ @@ -338,24 +307,19 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id) fas216_release(host); out_unregister: scsi_host_put(host); - out_unmap: - iounmap(base); out_region: ecard_release_resources(ec); out: return ret; } -static void __devexit arxescsi_remove(struct expansion_card *ec) +static void arxescsi_remove(struct expansion_card *ec) { struct Scsi_Host *host = ecard_get_drvdata(ec); - struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata; ecard_set_drvdata(ec, NULL); fas216_remove(host); - iounmap(info->base); - fas216_release(host); scsi_host_put(host); ecard_release_resources(ec); @@ -368,7 +332,7 @@ static const struct ecard_id arxescsi_cids[] = { static struct ecard_driver arxescsi_driver = { .probe = arxescsi_probe, - .remove = __devexit_p(arxescsi_remove), + .remove = arxescsi_remove, .id_table = arxescsi_cids, .drv = { .name = "arxescsi", |
