r1751
dslinux_amadeus at dslinux.in-berlin.de
dslinux_amadeus at dslinux.in-berlin.de
Sat May 5 01:32:21 CEST 2007
Author: amadeus
Date: 2007-05-05 01:32:15 +0200 (Sat, 05 May 2007)
New Revision: 1751
Log:
Do the init _before_ the first access.
Modified: trunk/linux-2.6.x/drivers/block/dldi_c.c
===================================================================
--- trunk/linux-2.6.x/drivers/block/dldi_c.c 2007-05-04 22:55:09 UTC (rev 1750)
+++ trunk/linux-2.6.x/drivers/block/dldi_c.c 2007-05-04 23:32:15 UTC (rev 1751)
@@ -358,6 +358,14 @@
{
int ret;
+ /* Start the interface */
+ _param_dldi.function = _io_dldi.fn_startup;
+ ret = _call_dldi();
+ if (ret == 0) {
+ printk(KERN_ERR "dldi: fn_startup failure\n");
+ return -EIO;
+ }
+
/*
* Get registered.
*/
@@ -365,6 +373,7 @@
printk(KERN_WARNING "dldi: unable to get major number\n");
return -EBUSY;
}
+
/*
* Allocate the device array, and initialize each one.
*/
@@ -375,22 +384,6 @@
}
setup_device(Devices, 0);
- /* Start the interface */
- _param_dldi.function = _io_dldi.fn_startup;
- ret = _call_dldi();
- if (ret == 0) {
- printk(KERN_ERR "dldi: fn_startup failure\n");
- if (Devices->gd) {
- del_gendisk(Devices->gd);
- put_disk(Devices->gd);
- }
- if (Devices->queue) {
- blk_put_queue(Devices->queue);
- }
- unregister_blkdev(dldi_major, "dldi");
- return -EIO;
- }
-
return 0;
}
More information about the dslinux-commit
mailing list