[PATCH xf86-video-amdgpu 3/5] Pass struct pci_device *pci_dev directly to amdgpu_get_scrninfo

Michel Dänzer michel at daenzer.net
Thu Oct 29 02:17:32 PDT 2015


From: Jammy Zhou <jammy.zhou at amd.com>

Instead of throwing away the type information by passing it as a void*.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/amdgpu_probe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amdgpu_probe.c b/src/amdgpu_probe.c
index 444e9b6..61605b9 100644
--- a/src/amdgpu_probe.c
+++ b/src/amdgpu_probe.c
@@ -176,7 +176,7 @@ static Bool amdgpu_open_drm_master(ScrnInfoPtr pScrn, AMDGPUEntPtr pAMDGPUEnt,
 	return TRUE;
 }
 
-static Bool amdgpu_get_scrninfo(int entity_num, void *pci_dev)
+static Bool amdgpu_get_scrninfo(int entity_num, struct pci_device *pci_dev)
 {
 	ScrnInfoPtr pScrn = NULL;
 	EntityInfoPtr pEnt;
@@ -266,7 +266,7 @@ static Bool
 amdgpu_pci_probe(DriverPtr pDriver,
 		 int entity_num, struct pci_device *device, intptr_t match_data)
 {
-	return amdgpu_get_scrninfo(entity_num, (void *)device);
+	return amdgpu_get_scrninfo(entity_num, device);
 }
 
 static Bool AMDGPUDriverFunc(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data)
-- 
2.6.1



More information about the xorg-driver-ati mailing list