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

memstick: r592: Use dev_get_drvdata

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: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Chuhong Yuan and committed by
Ulf Hansson
deaa5398 90b51e3c

+2 -4
+2 -4
drivers/memstick/host/r592.c
··· 847 847 #ifdef CONFIG_PM_SLEEP 848 848 static int r592_suspend(struct device *core_dev) 849 849 { 850 - struct pci_dev *pdev = to_pci_dev(core_dev); 851 - struct r592_device *dev = pci_get_drvdata(pdev); 850 + struct r592_device *dev = dev_get_drvdata(core_dev); 852 851 853 852 r592_clear_interrupts(dev); 854 853 memstick_suspend_host(dev->host); ··· 857 858 858 859 static int r592_resume(struct device *core_dev) 859 860 { 860 - struct pci_dev *pdev = to_pci_dev(core_dev); 861 - struct r592_device *dev = pci_get_drvdata(pdev); 861 + struct r592_device *dev = dev_get_drvdata(core_dev); 862 862 863 863 r592_clear_interrupts(dev); 864 864 r592_enable_device(dev, false);