Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide: Use dev_get_drvdata where possible

Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Chuhong Yuan and committed by
David S. Miller
baf6722a 7b5cf701

+2 -4
+1 -2
drivers/ide/siimage.c
··· 648 648 649 649 static void init_iops_siimage(ide_hwif_t *hwif) 650 650 { 651 - struct pci_dev *dev = to_pci_dev(hwif->dev); 652 - struct ide_host *host = pci_get_drvdata(dev); 651 + struct ide_host *host = dev_get_drvdata(hwif->dev); 653 652 654 653 hwif->hwif_data = NULL; 655 654
+1 -2
drivers/ide/via82cxxx.c
··· 175 175 static void via_set_drive(ide_hwif_t *hwif, ide_drive_t *drive) 176 176 { 177 177 ide_drive_t *peer = ide_get_pair_dev(drive); 178 - struct pci_dev *dev = to_pci_dev(hwif->dev); 179 - struct ide_host *host = pci_get_drvdata(dev); 178 + struct ide_host *host = dev_get_drvdata(hwif->dev); 180 179 struct via82cxxx_dev *vdev = host->host_priv; 181 180 struct ide_timing t, p; 182 181 unsigned int T, UT;