Commit 3a527da7 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] scsi/imm.c cleanup and fixes (3/8)

	* killed imm_pb_claim() call in imm_init()
parent d3cce34b
...@@ -187,12 +187,13 @@ static int imm_detect(Scsi_Host_Template * host) ...@@ -187,12 +187,13 @@ static int imm_detect(Scsi_Host_Template * host)
dev->mode = IMM_PS2; dev->mode = IMM_PS2;
/* Done configuration */ /* Done configuration */
imm_pb_release(dev);
if (imm_init(dev)) { if (imm_init(dev)) {
imm_pb_release(dev);
parport_unregister_device(dev->dev); parport_unregister_device(dev->dev);
continue; continue;
} }
imm_pb_release(dev);
/* now the glue ... */ /* now the glue ... */
switch (dev->mode) { switch (dev->mode) {
...@@ -726,26 +727,13 @@ static int imm_select(imm_struct *dev, int target) ...@@ -726,26 +727,13 @@ static int imm_select(imm_struct *dev, int target)
static int imm_init(imm_struct *dev) static int imm_init(imm_struct *dev)
{ {
int retv; if (imm_connect(dev, 0) != 1)
return 1;
#if defined(CONFIG_PARPORT) || defined(CONFIG_PARPORT_MODULE) imm_reset_pulse(dev->base);
if (imm_pb_claim(dev)) udelay(1000); /* Delay to allow devices to settle */
while (dev->p_busy) imm_disconnect(dev);
schedule(); /* We can safe schedule here */ udelay(1000); /* Another delay to allow devices to settle */
#endif return device_check(dev);
retv = imm_connect(dev, 0);
if (retv == 1) {
imm_reset_pulse(dev->base);
udelay(1000); /* Delay to allow devices to settle */
imm_disconnect(dev);
udelay(1000); /* Another delay to allow devices to settle */
retv = device_check(dev);
imm_pb_release(dev);
return retv;
}
imm_pb_release(dev);
return 1;
} }
static inline int imm_send_command(Scsi_Cmnd *cmd) static inline int imm_send_command(Scsi_Cmnd *cmd)
......
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