| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2010 - Maxim Levitsky |
|---|
| 3 | 4 | * 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. |
|---|
| 8 | 5 | */ |
|---|
| 9 | 6 | |
|---|
| 10 | 7 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 854 | 851 | #ifdef CONFIG_PM_SLEEP |
|---|
| 855 | 852 | static int r592_suspend(struct device *core_dev) |
|---|
| 856 | 853 | { |
|---|
| 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); |
|---|
| 859 | 855 | |
|---|
| 860 | 856 | r592_clear_interrupts(dev); |
|---|
| 861 | 857 | memstick_suspend_host(dev->host); |
|---|
| .. | .. |
|---|
| 865 | 861 | |
|---|
| 866 | 862 | static int r592_resume(struct device *core_dev) |
|---|
| 867 | 863 | { |
|---|
| 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); |
|---|
| 870 | 865 | |
|---|
| 871 | 866 | r592_clear_interrupts(dev); |
|---|
| 872 | 867 | r592_enable_device(dev, false); |
|---|