mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
drm/amdgpu: drm_device to amdgpu_device by inline-f (v2)
Get the amdgpu_device from the DRM device by use
of an inline function, drm_to_adev(). The inline
function resolves a pointer to struct drm_device
to a pointer to struct amdgpu_device.
v2: Use a typed visible static inline function
instead of an invisible macro.
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
50166d1ce5
commit
1348969ab6
@@ -408,7 +408,7 @@ static ssize_t show_##name(struct device *dev, \
|
||||
char *buf) \
|
||||
{ \
|
||||
struct drm_device *ddev = dev_get_drvdata(dev); \
|
||||
struct amdgpu_device *adev = ddev->dev_private; \
|
||||
struct amdgpu_device *adev = drm_to_adev(ddev); \
|
||||
\
|
||||
return snprintf(buf, PAGE_SIZE, "0x%08x\n", adev->field); \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user