summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Li <sunpeng.li@amd.com>2019-07-24 02:28:00 +0300
committerHarry Wentland <harry.wentland@amd.com>2019-07-25 23:19:19 +0300
commit3935ec4a1184a32696251d19d87849981f4d189d (patch)
treec1b47aafbf38fc8054a1a16ba2346f073cdedb50
parent0005cbda438fa846650ae52ce693eeaff6d16b92 (diff)
downloadlinux-3935ec4a1184a32696251d19d87849981f4d189d.tar.xz
drm/dp: Use non-cyclic idr
In preparation for adding aux devices for DP MST, make the IDR non-cyclic. That way, hotplug cycling MST devices won't needlessly increment the minor version index. Signed-off-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190723232808.28128-2-sunpeng.li@amd.com
-rw-r--r--drivers/gpu/drm/drm_dp_aux_dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c
index 5be28e3295f3..26e38dacf654 100644
--- a/drivers/gpu/drm/drm_dp_aux_dev.c
+++ b/drivers/gpu/drm/drm_dp_aux_dev.c
@@ -82,8 +82,7 @@ static struct drm_dp_aux_dev *alloc_drm_dp_aux_dev(struct drm_dp_aux *aux)
kref_init(&aux_dev->refcount);
mutex_lock(&aux_idr_mutex);
- index = idr_alloc_cyclic(&aux_idr, aux_dev, 0, DRM_AUX_MINORS,
- GFP_KERNEL);
+ index = idr_alloc(&aux_idr, aux_dev, 0, DRM_AUX_MINORS, GFP_KERNEL);
mutex_unlock(&aux_idr_mutex);
if (index < 0) {
kfree(aux_dev);