diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2021-10-15 10:40:45 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2021-10-19 10:31:32 +0200 |
commit | 9f40dbd4416f14657d9b354b7ec855244d97a91c (patch) | |
tree | 771c28ac61eeef5346c6faed692bfbcb4e198526 /drivers/gpu/drm/gma500/gem.c | |
parent | drm/gma500: Move helpers for struct gtt_range from gtt.c to gem.c (diff) | |
download | linux-9f40dbd4416f14657d9b354b7ec855244d97a91c.tar.xz linux-9f40dbd4416f14657d9b354b7ec855244d97a91c.zip |
drm/gma500: Use to_gtt_range() everywhere
Convert upcasts from struct drm_gem_object to struct gtt_range to
to_gtt_range(). Some places used container_of() directly.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/gma500/gem.c')
-rw-r--r-- | drivers/gpu/drm/gma500/gem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c index a41990dbcc0e..b52908313ee5 100644 --- a/drivers/gpu/drm/gma500/gem.c +++ b/drivers/gpu/drm/gma500/gem.c @@ -117,7 +117,7 @@ static vm_fault_t psb_gem_fault(struct vm_fault *vmf); static void psb_gem_free_object(struct drm_gem_object *obj) { - struct gtt_range *gtt = container_of(obj, struct gtt_range, gem); + struct gtt_range *gtt = to_gtt_range(obj); /* Remove the list map if one is present */ drm_gem_free_mmap_offset(obj); @@ -267,7 +267,7 @@ static vm_fault_t psb_gem_fault(struct vm_fault *vmf) dev = obj->dev; dev_priv = to_drm_psb_private(dev); - r = container_of(obj, struct gtt_range, gem); /* Get the gtt range */ + r = to_gtt_range(obj); /* Make sure we don't parallel update on a fault, nor move or remove something from beneath our feet */ |