aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2007-02-07 12:18:37 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-07 12:18:37 -0500
commit272103144ac1ff937ed22917e1de05da4d6943dd (patch)
treeb098235b3d20d408fe949ff29b032e056e149fe2
parent24e6458d9c0c445141488b70e1a01fa31ed86c8d (diff)
pdc202xx_new: remove useless code
Remove the following useless fragments from the driver: - the ide_dma_lostirq() and ide_dma_timeout() handlers which boil down to just printing the incoherent reset message and calling their default counterparts; - check for non-NULL drive->id in the ide_dma_check() handler -- this is assumed to be true by all other handlers (also, get rid of unnecessary nesting of the conditional statements there); - the comment before pdcnew_tune_drive() which has nothing to do with the code. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/pci/pdc202xx_new.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index 77a9aaa7dab9..fc2a45bb9651 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -249,13 +249,6 @@ static int pdcnew_tune_chipset(ide_drive_t *drive, u8 speed)
249 return err; 249 return err;
250} 250}
251 251
252/* 0 1 2 3 4 5 6 7 8
253 * 960, 480, 390, 300, 240, 180, 120, 90, 60
254 * 180, 150, 120, 90, 60
255 * DMA_Speed
256 * 180, 120, 90, 90, 90, 60, 30
257 * 11, 5, 4, 3, 2, 1, 0
258 */
259static void pdcnew_tune_drive(ide_drive_t *drive, u8 pio) 252static void pdcnew_tune_drive(ide_drive_t *drive, u8 pio)
260{ 253{
261 pio = ide_get_best_pio_mode(drive, pio, 4, NULL); 254 pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
@@ -313,12 +306,10 @@ static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive)
313 306
314 drive->init_speed = 0; 307 drive->init_speed = 0;
315 308
316 if (id && (id->capability & 1) && drive->autodma) { 309 if ((id->capability & 1) && drive->autodma) {
317 310
318 if (ide_use_dma(drive)) { 311 if (ide_use_dma(drive) && config_chipset_for_dma(drive))
319 if (config_chipset_for_dma(drive)) 312 return hwif->ide_dma_on(drive);
320 return hwif->ide_dma_on(drive);
321 }
322 313
323 goto fast_ata_pio; 314 goto fast_ata_pio;
324 315
@@ -336,20 +327,6 @@ static int pdcnew_quirkproc(ide_drive_t *drive)
336 return check_in_drive_lists(drive, pdc_quirk_drives); 327 return check_in_drive_lists(drive, pdc_quirk_drives);
337} 328}
338 329
339static int pdcnew_ide_dma_lostirq(ide_drive_t *drive)
340{
341 if (HWIF(drive)->resetproc != NULL)
342 HWIF(drive)->resetproc(drive);
343 return __ide_dma_lostirq(drive);
344}
345
346static int pdcnew_ide_dma_timeout(ide_drive_t *drive)
347{
348 if (HWIF(drive)->resetproc != NULL)
349 HWIF(drive)->resetproc(drive);
350 return __ide_dma_timeout(drive);
351}
352
353static void pdcnew_reset(ide_drive_t *drive) 330static void pdcnew_reset(ide_drive_t *drive)
354{ 331{
355 /* 332 /*
@@ -599,8 +576,6 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif)
599 hwif->err_stops_fifo = 1; 576 hwif->err_stops_fifo = 1;
600 577
601 hwif->ide_dma_check = &pdcnew_config_drive_xfer_rate; 578 hwif->ide_dma_check = &pdcnew_config_drive_xfer_rate;
602 hwif->ide_dma_lostirq = &pdcnew_ide_dma_lostirq;
603 hwif->ide_dma_timeout = &pdcnew_ide_dma_timeout;
604 579
605 if (!hwif->udma_four) 580 if (!hwif->udma_four)
606 hwif->udma_four = pdcnew_cable_detect(hwif) ? 0 : 1; 581 hwif->udma_four = pdcnew_cable_detect(hwif) ? 0 : 1;