forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/memstick/host/r592.c
....@@ -1,10 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2010 - Maxim Levitsky
34 * driver for Ricoh memstick readers
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
85 */
96
107 #include <linux/kernel.h>
....@@ -854,8 +851,7 @@
854851 #ifdef CONFIG_PM_SLEEP
855852 static int r592_suspend(struct device *core_dev)
856853 {
857
- struct pci_dev *pdev = to_pci_dev(core_dev);
858
- struct r592_device *dev = pci_get_drvdata(pdev);
854
+ struct r592_device *dev = dev_get_drvdata(core_dev);
859855
860856 r592_clear_interrupts(dev);
861857 memstick_suspend_host(dev->host);
....@@ -865,8 +861,7 @@
865861
866862 static int r592_resume(struct device *core_dev)
867863 {
868
- struct pci_dev *pdev = to_pci_dev(core_dev);
869
- struct r592_device *dev = pci_get_drvdata(pdev);
864
+ struct r592_device *dev = dev_get_drvdata(core_dev);
870865
871866 r592_clear_interrupts(dev);
872867 r592_enable_device(dev, false);