From 5fe7454aa9c6ef5fcf506b0f2dfc20f696891f1a Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 10 May 2010 21:41:37 +0200 Subject: libata-sff: ap->[last_]ctl are SFF specific ap->[last_]ctl are specific to SFF controllers. Put them inside CONFIG_ATA_SFF and move initialization into ata_sff_port_init(). Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- include/linux/libata.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/linux/libata.h') diff --git a/include/linux/libata.h b/include/linux/libata.h index 19f716e..85b99b8 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -721,10 +721,10 @@ struct ata_port { #ifdef CONFIG_ATA_SFF struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ -#endif /* CONFIG_ATA_SFF */ - u8 ctl; /* cache of ATA control register */ u8 last_ctl; /* Cache last written value */ +#endif /* CONFIG_ATA_SFF */ + unsigned int pio_mask; unsigned int mwdma_mask; unsigned int udma_mask; @@ -1435,7 +1435,11 @@ static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf) { memset(tf, 0, sizeof(*tf)); +#ifdef CONFIG_ATA_SFF tf->ctl = dev->link->ap->ctl; +#else + tf->ctl = ATA_DEVCTL_OBS; +#endif if (dev->devno == 0) tf->device = ATA_DEVICE_OBS; else -- cgit v1.1