Commit 16e6aeca authored by Zhenwen Xu's avatar Zhenwen Xu Committed by Jeff Garzik

[libata] fix build error on drivers/ata/pata_legacy.c

fix those errors:

drivers/ata/pata_legacy.c: In function ‘pdc_data_xfer_vlb’:
drivers/ata/pata_legacy.c:289: error: ‘ap’ undeclared (first use in this function)
drivers/ata/pata_legacy.c:289: error: (Each undeclared identifier is reported only once
drivers/ata/pata_legacy.c:289: error: for each function it appears in.)
drivers/ata/pata_legacy.c: At top level:
drivers/ata/pata_legacy.c:869: error: ‘ATA_PFLAG_PIO32_CHANGE’ undeclared here (not in a
+function)
make[2]: *** [drivers/ata/pata_legacy.o] Error 1
make[1]: *** [drivers/ata] Error 2
Signed-off-by: default avatarZhenwen Xu <helight.xu@gmail.com>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent b4746ed7
...@@ -285,10 +285,11 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev, ...@@ -285,10 +285,11 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
unsigned char *buf, unsigned int buflen, int rw) unsigned char *buf, unsigned int buflen, int rw)
{ {
int slop = buflen & 3; 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 */ /* 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) if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3)
&& (ap->pflags & ATA_PFLAG_PIO32)) { && (ap->pflags & ATA_PFLAG_PIO32)) {
struct ata_port *ap = dev->link->ap;
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
...@@ -866,7 +867,7 @@ static struct legacy_controller controllers[] = { ...@@ -866,7 +867,7 @@ static struct legacy_controller controllers[] = {
0, 0, NULL }, 0, 0, NULL },
{"PDC20230", &pdc20230_port_ops, 0x7, {"PDC20230", &pdc20230_port_ops, 0x7,
ATA_FLAG_NO_IORDY, ATA_FLAG_NO_IORDY,
ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, NULL }, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, NULL },
{"HT6560A", &ht6560a_port_ops, 0x07, {"HT6560A", &ht6560a_port_ops, 0x07,
ATA_FLAG_NO_IORDY, 0, NULL }, ATA_FLAG_NO_IORDY, 0, NULL },
{"HT6560B", &ht6560b_port_ops, 0x1F, {"HT6560B", &ht6560b_port_ops, 0x1F,
...@@ -877,13 +878,13 @@ static struct legacy_controller controllers[] = { ...@@ -877,13 +878,13 @@ static struct legacy_controller controllers[] = {
0, 0, NULL }, 0, 0, NULL },
{"QDI6500", &qdi6500_port_ops, 0x07, {"QDI6500", &qdi6500_port_ops, 0x07,
ATA_FLAG_NO_IORDY, ATA_FLAG_NO_IORDY,
ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port }, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, qdi_port },
{"QDI6580", &qdi6580_port_ops, 0x1F, {"QDI6580", &qdi6580_port_ops, 0x1F,
0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port }, 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, qdi_port },
{"QDI6580DP", &qdi6580dp_port_ops, 0x1F, {"QDI6580DP", &qdi6580dp_port_ops, 0x1F,
0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port }, 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, qdi_port },
{"W83759A", &winbond_port_ops, 0x1F, {"W83759A", &winbond_port_ops, 0x1F,
0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE,
winbond_port } winbond_port }
}; };
......
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