Skip to content

Commit 4cae34d

Browse files
KyleMahlkuchalexdeucher
authored andcommitted
drm/radeon: Clean up code in radeon_pci_shutdown()
This fixes the formatting on one comment and consolidates the pci_get_drvdata() into the radeon_suspend_kms(). Signed-off-by: Kyle Mahlkuch <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 9012456 commit 4cae34d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/gpu/drm/radeon/radeon_drv.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,24 +379,21 @@ radeon_pci_remove(struct pci_dev *pdev)
379379
static void
380380
radeon_pci_shutdown(struct pci_dev *pdev)
381381
{
382-
#ifdef CONFIG_PPC64
383-
struct drm_device *ddev = pci_get_drvdata(pdev);
384-
#endif
385-
386382
/* if we are running in a VM, make sure the device
387383
* torn down properly on reboot/shutdown
388384
*/
389385
if (radeon_device_is_virtual())
390386
radeon_pci_remove(pdev);
391387

392388
#ifdef CONFIG_PPC64
393-
/* Some adapters need to be suspended before a
389+
/*
390+
* Some adapters need to be suspended before a
394391
* shutdown occurs in order to prevent an error
395392
* during kexec.
396393
* Make this power specific becauase it breaks
397394
* some non-power boards.
398395
*/
399-
radeon_suspend_kms(ddev, true, true, false);
396+
radeon_suspend_kms(pci_get_drvdata(pdev), true, true, false);
400397
#endif
401398
}
402399

0 commit comments

Comments
 (0)