From 36501650ec45b1db308c3b51886044863be2d762 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 1 Feb 2008 23:09:31 +0100 Subject: ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t Keep pointer to struct device instead of struct pci_dev in ide_hwif_t. While on it: * Use *dev->dma_mask instead of pci_dev->dma_mask in ide_toggle_bounce(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/pci/cy82c693.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/ide/pci/cy82c693.c') diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 3ec4c659a37..d43c52da490 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c @@ -228,7 +228,7 @@ static void cy82c693_set_dma_mode(ide_drive_t *drive, const u8 mode) static void cy82c693_set_pio_mode(ide_drive_t *drive, const u8 pio) { ide_hwif_t *hwif = HWIF(drive); - struct pci_dev *dev = hwif->pci_dev; + struct pci_dev *dev = to_pci_dev(hwif->dev); pio_clocks_t pclk; unsigned int addrCtrl; @@ -397,8 +397,9 @@ static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) { static ide_hwif_t *primary; + struct pci_dev *dev = to_pci_dev(hwif->dev); - if (PCI_FUNC(hwif->pci_dev->devfn) == 1) + if (PCI_FUNC(dev->devfn) == 1) primary = hwif; else { hwif->mate = primary; -- cgit v1.2.3