From: Basavaraj Natikar Date: Thu, 23 Sep 2021 12:29:29 +0000 (+0530) Subject: HID: amd_sfh: switch from 'pci_' to 'dev_' API X-Git-Tag: v6.1-rc5~2717^2~8^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba70a4ff231c2c79d7bcc6dc5ab5636c5aec8621;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c index f984b91..18eeca4 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;