diff options
author | Basavaraj Natikar <Basavaraj.Natikar@amd.com> | 2021-09-23 15:29:29 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-09-27 11:01:44 +0300 |
commit | ba70a4ff231c2c79d7bcc6dc5ab5636c5aec8621 (patch) | |
tree | 2fc4714bd481db5adc1df2b64e724467adb1b0a9 /drivers/hid | |
parent | c45d2b54cc73c439ccc727baf241416dc5498722 (diff) | |
download | linux-ba70a4ff231c2c79d7bcc6dc5ab5636c5aec8621.tar.xz |
HID: amd_sfh: switch from 'pci_' to 'dev_' API
The wrappers pci_set_drvdata or pci_get_drvdata changed to
dev_set_drvdata or dev_get_drvdata.
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c index f984b9174c65..18eeca4601ab 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c @@ -234,7 +234,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i return -ENOMEM; privdata->pdev = pdev; - pci_set_drvdata(pdev, privdata); + dev_set_drvdata(&pdev->dev, privdata); rc = pcim_enable_device(pdev); if (rc) return rc; @@ -269,8 +269,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i static int __maybe_unused amd_mp2_pci_resume(struct device *dev) { - struct pci_dev *pdev = to_pci_dev(dev); - struct amd_mp2_dev *mp2 = pci_get_drvdata(pdev); + struct amd_mp2_dev *mp2 = dev_get_drvdata(dev); struct amdtp_cl_data *cl_data = mp2->cl_data; struct amd_mp2_sensor_info info; int i, status; @@ -295,8 +294,7 @@ static int __maybe_unused amd_mp2_pci_resume(struct device *dev) static int __maybe_unused amd_mp2_pci_suspend(struct device *dev) { - struct pci_dev *pdev = to_pci_dev(dev); - struct amd_mp2_dev *mp2 = pci_get_drvdata(pdev); + struct amd_mp2_dev *mp2 = dev_get_drvdata(dev); struct amdtp_cl_data *cl_data = mp2->cl_data; int i, status; |