* [PATCH] pata_ali: cleanup ali_set_piomode()
@ 2011-10-13 11:09 Bartlomiej Zolnierkiewicz
2011-10-13 12:53 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2011-10-13 11:09 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pata_ali: cleanup ali_set_piomode()
Merge ali_fifo_control() calls.
This changes behavior but there shouldn't be any problems with it.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
earlier references:
https://lkml.org/lkml/2010/1/18/258
drivers/ata/pata_ali.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Index: b/drivers/ata/pata_ali.c
===================================================================
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -222,12 +222,9 @@ static void ali_set_piomode(struct ata_p
}
/* PIO FIFO is only permitted on ATA disk */
- if (adev->class != ATA_DEV_ATA)
- ali_fifo_control(ap, adev, 0x00);
- ali_program_modes(ap, adev, &t, 0);
- if (adev->class == ATA_DEV_ATA)
- ali_fifo_control(ap, adev, 0x05);
+ ali_fifo_control(ap, adev, (adev->class == ATA_DEV_ATA) ? 0x05 : 0x00);
+ ali_program_modes(ap, adev, &t, 0);
}
/**
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pata_ali: cleanup ali_set_piomode()
2011-10-13 11:09 [PATCH] pata_ali: cleanup ali_set_piomode() Bartlomiej Zolnierkiewicz
@ 2011-10-13 12:53 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2011-10-13 12:53 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Jeff Garzik, linux-ide, linux-kernel
On Thu, 13 Oct 2011 13:09:25 +0200
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] pata_ali: cleanup ali_set_piomode()
>
> Merge ali_fifo_control() calls.
>
> This changes behavior but there shouldn't be any problems with it.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
It's not really much of a 'clean' and the old behaviour matches the
documentation.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-13 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 11:09 [PATCH] pata_ali: cleanup ali_set_piomode() Bartlomiej Zolnierkiewicz
2011-10-13 12:53 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).