From 2f4a58e852d103488fc435f0c1ecbb9a86761579 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 3 Dec 2014 17:07:22 +1000 Subject: drm/nouveau/subdev: always upcast through nouveau_subdev()/nouveau_engine() Has additional safeties for one. For two, needed for an upcoming commit that removes abuse of nouveau_object.engine. Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/core/include/subdev/instmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/drm/nouveau/core/include/subdev/instmem.h') diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h b/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h index c1df26f..4953e6c 100644 --- a/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h @@ -42,7 +42,7 @@ nouveau_instmem(void *obj) nv_subidx(obj) == NVDEV_SUBDEV_INSTMEM) return obj; - return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_INSTMEM]; + return (void *)nouveau_subdev(obj, NVDEV_SUBDEV_INSTMEM); } extern struct nouveau_oclass *nv04_instmem_oclass; -- cgit v1.1