Commit 3fcfe387 authored by Jeff Garzik's avatar Jeff Garzik

[libata] flags cleanup

Remove unused/redundant flags ATA_DFLAG_{MASTER,WCACHE}
parent 05120b79
...@@ -390,7 +390,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev) ...@@ -390,7 +390,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev)
{ {
unsigned int pio = adev->pio_mode; unsigned int pio = adev->pio_mode;
struct pci_dev *dev = ap->host_set->pdev; struct pci_dev *dev = ap->host_set->pdev;
unsigned int is_slave = (adev->flags & ATA_DFLAG_MASTER) ? 0 : 1; unsigned int is_slave = (adev->devno != 0);
unsigned int master_port= ap->port_no ? 0x42 : 0x40; unsigned int master_port= ap->port_no ? 0x42 : 0x40;
unsigned int slave_port = 0x44; unsigned int slave_port = 0x44;
u16 master_data; u16 master_data;
......
...@@ -2901,7 +2901,6 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, ...@@ -2901,7 +2901,6 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
ap->flags |= ent->host_flags; ap->flags |= ent->host_flags;
ap->ops = ent->port_ops; ap->ops = ent->port_ops;
ap->cbl = ATA_CBL_NONE; ap->cbl = ATA_CBL_NONE;
ap->device[0].flags = ATA_DFLAG_MASTER;
ap->active_tag = ATA_TAG_POISON; ap->active_tag = ATA_TAG_POISON;
ap->last_ctl = 0xFF; ap->last_ctl = 0xFF;
......
...@@ -87,10 +87,7 @@ enum { ...@@ -87,10 +87,7 @@ enum {
/* struct ata_device stuff */ /* struct ata_device stuff */
ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */
ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */
ATA_DFLAG_MASTER = (1 << 2), /* is device 0? */ ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */
ATA_DFLAG_WCACHE = (1 << 3), /* has write cache we can
* (hopefully) flush? */
ATA_DFLAG_LOCK_SECTORS = (1 << 4), /* don't adjust max_sectors */
ATA_DEV_UNKNOWN = 0, /* unknown device */ ATA_DEV_UNKNOWN = 0, /* unknown device */
ATA_DEV_ATA = 1, /* ATA device */ ATA_DEV_ATA = 1, /* ATA device */
......
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