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/engine/graph.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/drm/nouveau/core/include/engine/graph.h') diff --git a/drivers/gpu/drm/nouveau/core/include/engine/graph.h b/drivers/gpu/drm/nouveau/core/include/engine/graph.h index d5055570d01b..d61dcb7d6d5f 100644 --- a/drivers/gpu/drm/nouveau/core/include/engine/graph.h +++ b/drivers/gpu/drm/nouveau/core/include/engine/graph.h @@ -35,7 +35,7 @@ struct nouveau_graph { static inline struct nouveau_graph * nouveau_graph(void *obj) { - return (void *)nv_device(obj)->subdev[NVDEV_ENGINE_GR]; + return (void *)nouveau_engine(obj, NVDEV_ENGINE_GR); } #define nouveau_graph_create(p,e,c,y,d) \ -- cgit v1.2.3