summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2016-07-28 17:50:45 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2016-08-04 15:58:15 +0300
commit1354f734c5f3e9f08f97d22aff97612ee7ec9d3e (patch)
tree4aa0c6676144a4205556d4af04a637b195891818 /drivers/gpu/drm
parentc4e3170a0cdeec5ba9749a49a757b7ea722829d6 (diff)
downloadlinux-1354f734c5f3e9f08f97d22aff97612ee7ec9d3e.tar.gz
linux-1354f734c5f3e9f08f97d22aff97612ee7ec9d3e.tar.bz2
linux-1354f734c5f3e9f08f97d22aff97612ee7ec9d3e.zip
drm/i915: Remove useless rate_to_index() usage
No need to iterate the rates array in intel_dp_max_link_rate(). We know the max rate will be the last entry, and we already know the size. Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Cc: Jim Bride <jim.bride@linux.intel.com> Cc: Manasi D Navare <manasi.d.navare@intel.com> Cc: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1469717448-4297-10-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a0c99c06210e..65943ae3df56 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1447,7 +1447,7 @@ intel_dp_max_link_rate(struct intel_dp *intel_dp)
if (WARN_ON(len <= 0))
return 162000;
- return rates[rate_to_index(0, rates) - 1];
+ return rates[len - 1];
}
int intel_dp_rate_select(struct intel_dp *intel_dp, int rate)