drm: make drm_mode_object_find typesafe
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> Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
97f5ab6651
commit
7a9c906094
2 changed files with 4 additions and 2 deletions
|
|
@ -247,7 +247,8 @@ static void drm_mode_object_put(struct drm_device *dev,
|
|||
mutex_unlock(&dev->mode_config.idr_mutex);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue