diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-05-03 20:41:19 +0200 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2018-05-10 17:36:25 +0200 |
commit | 818c05d8e2679e27800b9ce5bc2b0a89ecd164e8 (patch) | |
tree | 0910b836409f9e97d6aedfa7e0228d61286b6f51 /drivers/gpu/drm/drm_panel_orientation_quirks.c | |
parent | drm/dp: Correctly mask DP_TRAINING_AUX_RD_INTERVAL values for DP 1.4 (diff) | |
download | linux-818c05d8e2679e27800b9ce5bc2b0a89ecd164e8.tar.xz linux-818c05d8e2679e27800b9ce5bc2b0a89ecd164e8.zip |
drm: panel-orientation-quirks: Convert to use match_string() helper
The new helper returns index of the matching string in an array.
We are going to use it here.
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180503184119.22355-1-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_panel_orientation_quirks.c')
-rw-r--r-- | drivers/gpu/drm/drm_panel_orientation_quirks.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c index caebddda8bce..fe9c6c731e87 100644 --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c @@ -172,10 +172,9 @@ int drm_get_panel_orientation_quirk(int width, int height) if (!bios_date) continue; - for (i = 0; data->bios_dates[i]; i++) { - if (!strcmp(data->bios_dates[i], bios_date)) - return data->orientation; - } + i = match_string(data->bios_dates, -1, bios_date); + if (i >= 0) + return data->orientation; } return DRM_MODE_PANEL_ORIENTATION_UNKNOWN; |