diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-07-28 17:50:45 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-08-04 15:58:15 +0300 |
commit | 1354f734c5f3e9f08f97d22aff97612ee7ec9d3e (patch) | |
tree | 4aa0c6676144a4205556d4af04a637b195891818 /drivers/gpu/drm | |
parent | c4e3170a0cdeec5ba9749a49a757b7ea722829d6 (diff) | |
download | linux-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.c | 2 |
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) |