drm/amd/display: Use dev_get_drvdata
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
911d8b3069
commit
ef1de36181
@ -2430,8 +2430,7 @@ static ssize_t s3_debug_store(struct device *device,
|
||||
{
|
||||
int ret;
|
||||
int s3_state;
|
||||
struct pci_dev *pdev = to_pci_dev(device);
|
||||
struct drm_device *drm_dev = pci_get_drvdata(pdev);
|
||||
struct drm_device *drm_dev = dev_get_drvdata(device);
|
||||
struct amdgpu_device *adev = drm_dev->dev_private;
|
||||
|
||||
ret = kstrtoint(buf, 0, &s3_state);
|
||||
|
Loading…
Reference in New Issue
Block a user