diff mbox

[1/6,drm] : make drm_mode_object_find typesafe

Message ID cfb4793ee9fac715fe80bb0b3fe0177ce5bfad2c.1249997742.git.daniel.vetter@ffwll.ch (mailing list archive)
State Superseded
Headers show

Commit Message

Daniel Vetter Aug. 11, 2009, 2:05 p.m. UTC
I've wasted half a day hunting a bug that could easily be spotted by
gcc. Prevent this from reoccurring.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
 drivers/gpu/drm/drm_crtc.c |    3 ++-
 include/drm/drm_crtc.h     |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox


diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 33be210..addb09d 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -243,7 +243,8 @@  static void drm_mode_object_put(struct drm_device *dev,
-void *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type)
+struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
+		uint32_t id, uint32_t type)
 	struct drm_mode_object *obj = NULL;
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 7300fb8..1946d42 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -691,7 +691,8 @@  extern void drm_mode_connector_detach_encoder(struct drm_connector *connector,
 					   struct drm_encoder *encoder);
 extern bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
 					 int gamma_size);
-extern void *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type);
+extern struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
+		uint32_t id, uint32_t type);
 /* IOCTLs */
 extern int drm_mode_getresources(struct drm_device *dev,
 				 void *data, struct drm_file *file_priv);