[PATCH] fix error ong drivers/ata/pata_legacy.c

From: Zhenwen Xu
Date: Fri Apr 17 2009 - 01:04:50 EST


Signed-off-by: Zhenwen Xu <helight.xu@xxxxxxxxx>
---
drivers/ata/pata_legacy.c | 3 ++-
include/linux/libata.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 6f985be..58e3855 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -285,10 +285,11 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
unsigned char *buf, unsigned int buflen, int rw)
{
int slop = buflen & 3;
+ struct ata_port *ap = dev->link->ap;
+
/* 32bit I/O capable *and* we need to write a whole number of dwords */
if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3)
&& (ap->pflags & ATA_PFLAG_PIO32)) {
- struct ata_port *ap = dev->link->ap;
unsigned long flags;

local_irq_save(flags);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3d501db..1fdd3eb 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -227,7 +227,7 @@ enum {
ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */

ATA_PFLAG_PIO32 = (1 << 20), /* 32bit PIO */
- ATA_PFLAG_PIO32CHANGE = (1 << 21), /* 32bit PIO can be turned on/off */
+ ATA_PFLAG_PIO32_CHANGE = (1 << 21), /* 32bit PIO can be turned on/off */

/* struct ata_queued_cmd flags */
ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */
--
1.5.6.5

--
---------------------------------
Zhenwen Xu - Open and Free
Home Page: http://zhwen.org
My Studio: http://dim4.cn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/