@@ -144,9 +144,9 @@ int drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj,
uint32_t obj_type);
void drm_mode_object_register(struct drm_device *dev,
struct drm_mode_object *obj);
-struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev,
- struct drm_file *file_priv,
- uint32_t id, uint32_t type);
+struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
+ struct drm_file *file_priv,
+ uint32_t id, uint32_t type);
void drm_mode_object_unregister(struct drm_device *dev,
struct drm_mode_object *object);
int drm_mode_object_get_properties(struct drm_mode_object *obj, bool atomic,
@@ -888,7 +888,7 @@ struct drm_framebuffer *drm_framebuffer_lookup(struct drm_device *dev,
struct drm_mode_object *obj;
struct drm_framebuffer *fb = NULL;
- obj = __drm_mode_object_find(dev, file_priv, id, DRM_MODE_OBJECT_FB);
+ obj = drm_mode_object_find(dev, file_priv, id, DRM_MODE_OBJECT_FB);
if (obj)
fb = obj_to_fb(obj);
return fb;
@@ -133,9 +133,20 @@ bool drm_mode_object_lease_required(uint32_t type)
}
}
-struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev,
- struct drm_file *file_priv,
- uint32_t id, uint32_t type)
+/**
+ * drm_mode_object_find - look up a drm object with static lifetime
+ * @dev: drm device
+ * @file_priv: drm file
+ * @id: id of the mode object
+ * @type: type of the mode object
+ *
+ * This function is used to look up a modeset object. It will acquire a
+ * reference for reference counted objects. This reference must be dropped again
+ * by callind drm_mode_object_put().
+ */
+struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
+ struct drm_file *file_priv,
+ uint32_t id, uint32_t type)
{
struct drm_mode_object *obj = NULL;
@@ -158,27 +169,6 @@ struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev,
return obj;
}
-
-/**
- * drm_mode_object_find - look up a drm object with static lifetime
- * @dev: drm device
- * @file_priv: drm file
- * @id: id of the mode object
- * @type: type of the mode object
- *
- * This function is used to look up a modeset object. It will acquire a
- * reference for reference counted objects. This reference must be dropped again
- * by callind drm_mode_object_put().
- */
-struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
- struct drm_file *file_priv,
- uint32_t id, uint32_t type)
-{
- struct drm_mode_object *obj = NULL;
-
- obj = __drm_mode_object_find(dev, file_priv, id, type);
- return obj;
-}
EXPORT_SYMBOL(drm_mode_object_find);
/**
@@ -656,7 +656,7 @@ struct drm_property_blob *drm_property_lookup_blob(struct drm_device *dev,
struct drm_mode_object *obj;
struct drm_property_blob *blob = NULL;
- obj = __drm_mode_object_find(dev, NULL, id, DRM_MODE_OBJECT_BLOB);
+ obj = drm_mode_object_find(dev, NULL, id, DRM_MODE_OBJECT_BLOB);
if (obj)
blob = obj_to_blob(obj);
return blob;
@@ -919,8 +919,8 @@ bool drm_property_change_valid_get(struct drm_property *property,
if (value == 0)
return true;
- *ref = __drm_mode_object_find(property->dev, NULL, value,
- property->values[0]);
+ *ref = drm_mode_object_find(property->dev, NULL, value,
+ property->values[0]);
return *ref != NULL;
}
Redundant wrapper for drm_mode_object_find is removed. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> --- drivers/gpu/drm/drm_crtc_internal.h | 6 ++--- drivers/gpu/drm/drm_framebuffer.c | 2 +- drivers/gpu/drm/drm_mode_object.c | 38 +++++++++++------------------ drivers/gpu/drm/drm_property.c | 6 ++--- 4 files changed, 21 insertions(+), 31 deletions(-)