Commit ba70a4ff authored by Basavaraj Natikar's avatar Basavaraj Natikar Committed by Jiri Kosina

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: default avatarBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent c45d2b54
...@@ -234,7 +234,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i ...@@ -234,7 +234,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
return -ENOMEM; return -ENOMEM;
privdata->pdev = pdev; privdata->pdev = pdev;
pci_set_drvdata(pdev, privdata); dev_set_drvdata(&pdev->dev, privdata);
rc = pcim_enable_device(pdev); rc = pcim_enable_device(pdev);
if (rc) if (rc)
return rc; return rc;
...@@ -269,8 +269,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i ...@@ -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) static int __maybe_unused amd_mp2_pci_resume(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct amd_mp2_dev *mp2 = dev_get_drvdata(dev);
struct amd_mp2_dev *mp2 = pci_get_drvdata(pdev);
struct amdtp_cl_data *cl_data = mp2->cl_data; struct amdtp_cl_data *cl_data = mp2->cl_data;
struct amd_mp2_sensor_info info; struct amd_mp2_sensor_info info;
int i, status; int i, status;
...@@ -295,8 +294,7 @@ static int __maybe_unused amd_mp2_pci_resume(struct device *dev) ...@@ -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) static int __maybe_unused amd_mp2_pci_suspend(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct amd_mp2_dev *mp2 = dev_get_drvdata(dev);
struct amd_mp2_dev *mp2 = pci_get_drvdata(pdev);
struct amdtp_cl_data *cl_data = mp2->cl_data; struct amdtp_cl_data *cl_data = mp2->cl_data;
int i, status; int i, status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment