mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
drm/radeon: Clean up pdev->dev instances in probe
Get a struct device pointer from the start and use it. Signed-off-by: Daniel Palmer <daniel@0x0f.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
3ac635367e
commit
d0da43def2
|
|
@ -262,6 +262,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
|
|||
unsigned long flags = 0;
|
||||
struct drm_device *ddev;
|
||||
struct radeon_device *rdev;
|
||||
struct device *dev = &pdev->dev;
|
||||
const struct drm_format_info *format;
|
||||
int ret;
|
||||
|
||||
|
|
@ -277,7 +278,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
|
|||
case CHIP_VERDE:
|
||||
case CHIP_OLAND:
|
||||
case CHIP_HAINAN:
|
||||
dev_info(&pdev->dev,
|
||||
dev_info(dev,
|
||||
"SI support disabled by module param\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
@ -289,7 +290,7 @@ static int radeon_pci_probe(struct pci_dev *pdev,
|
|||
case CHIP_HAWAII:
|
||||
case CHIP_KABINI:
|
||||
case CHIP_MULLINS:
|
||||
dev_info(&pdev->dev,
|
||||
dev_info(dev,
|
||||
"CIK support disabled by module param\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
@ -303,11 +304,11 @@ static int radeon_pci_probe(struct pci_dev *pdev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
rdev = devm_drm_dev_alloc(&pdev->dev, &kms_driver, typeof(*rdev), ddev);
|
||||
rdev = devm_drm_dev_alloc(dev, &kms_driver, typeof(*rdev), ddev);
|
||||
if (IS_ERR(rdev))
|
||||
return PTR_ERR(rdev);
|
||||
|
||||
rdev->dev = &pdev->dev;
|
||||
rdev->dev = dev;
|
||||
rdev->pdev = pdev;
|
||||
ddev = rdev_to_drm(rdev);
|
||||
ddev->dev_private = rdev;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user