Skip to content

Commit a182807

Browse files
committed
ide: remove try_to_identify() wrapper
There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent f77e03c commit a182807

1 file changed

Lines changed: 9 additions & 25 deletions

File tree

‎drivers/ide/ide-probe.c‎

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static void do_identify(ide_drive_t *drive, u8 cmd)
250250
}
251251

252252
/**
253-
* actual_try_to_identify - send ata/atapi identify
253+
* try_to_identify - send ATA/ATAPI identify
254254
* @drive: drive to identify
255255
* @cmd: command to use
256256
*
@@ -262,7 +262,7 @@ static void do_identify(ide_drive_t *drive, u8 cmd)
262262
* 2 device aborted the command (refused to identify itself)
263263
*/
264264

265-
static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
265+
static int try_to_identify(ide_drive_t *drive, u8 cmd)
266266
{
267267
ide_hwif_t *hwif = drive->hwif;
268268
struct ide_io_ports *io_ports = &hwif->io_ports;
@@ -271,6 +271,13 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
271271
unsigned long timeout;
272272
u8 s = 0, a = 0;
273273

274+
/*
275+
* Disable device IRQ. Otherwise we'll get spurious interrupts
276+
* during the identify phase that the IRQ handler isn't expecting.
277+
*/
278+
if (io_ports->ctl_addr)
279+
tp_ops->set_irq(hwif, 0);
280+
274281
/* take a deep breath */
275282
msleep(50);
276283

@@ -327,29 +334,6 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
327334
return rc;
328335
}
329336

330-
/**
331-
* try_to_identify - try to identify a drive
332-
* @drive: drive to probe
333-
* @cmd: command to use
334-
*
335-
* Issue the identify command.
336-
*/
337-
338-
static int try_to_identify (ide_drive_t *drive, u8 cmd)
339-
{
340-
ide_hwif_t *hwif = drive->hwif;
341-
const struct ide_tp_ops *tp_ops = hwif->tp_ops;
342-
343-
/*
344-
* Disable device IRQ. Otherwise we'll get spurious interrupts
345-
* during the identify phase that the IRQ handler isn't expecting.
346-
*/
347-
if (hwif->io_ports.ctl_addr)
348-
tp_ops->set_irq(hwif, 0);
349-
350-
return actual_try_to_identify(drive, cmd);
351-
}
352-
353337
int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus)
354338
{
355339
u8 stat;

0 commit comments

Comments
 (0)