Commit f88c7698 authored by Jamie Lenehan's avatar Jamie Lenehan Committed by Christoph Hellwig

[PATCH] introduce scsi_host_alloc for dc395x

On Fri, Jun 06, 2003 at 10:01:03AM +0200, Christoph Hellwig wrote:
> Rediffed version, with Mike's isp fix and taking the new
> scsi_add_host users in usb in account.
>
> Currently this is juist a new name for scsi_register, but we make
> sure new-style drivers never call scsi_register/scsi_unregister
> but always scsi_host_alloc/scsi_host_put in this patch so the
> next patch can introduce code specific to legacy drivers in
> the former.  Also cleanup scsi_register/scsi_host_alloc a bit.

I think I made the dc395x driver new style init as of 2.5.70-bk9 (if
what scsi_mid_low_api.txt calls "hotplug" style is new style then it
is). So it'll need to be updated as well.
parent 854cd506
......@@ -5726,9 +5726,9 @@ DC395x_init(Scsi_Host_Template * host_template, u32 io_port, u8 irq,
/*
*$$$$$$$$$$$ MEMORY ALLOCATE FOR ADAPTER CONTROL BLOCK $$$$$$$$$$$$
*/
host = scsi_register(host_template, sizeof(struct AdapterCtlBlk));
host = scsi_host_alloc(host_template, sizeof(struct AdapterCtlBlk));
if (!host) {
dprintkl(KERN_INFO, "pSH scsi_register ERROR\n");
dprintkl(KERN_INFO, "pSH scsi_host_alloc ERROR\n");
return 0;
}
DC395x_print_eeprom_settings(index);
......@@ -5736,7 +5736,7 @@ DC395x_init(Scsi_Host_Template * host_template, u32 io_port, u8 irq,
pACB = (struct AdapterCtlBlk *) host->hostdata;
if (DC395x_initACB(host, io_port, irq, index)) {
scsi_unregister(host);
scsi_host_put(host);
return 0;
}
DC395x_print_config(pACB);
......@@ -5755,7 +5755,7 @@ DC395x_init(Scsi_Host_Template * host_template, u32 io_port, u8 irq,
} else {
dprintkl(KERN_INFO, "DC395x_initAdapter initial ERROR\n");
scsi_unregister(host);
scsi_host_put(host);
host = NULL;
}
return host;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment