Commit 818c05d8 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Sean Paul

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180503184119.22355-1-andriy.shevchenko@linux.intel.com
parent 2f065d8a
...@@ -172,11 +172,10 @@ int drm_get_panel_orientation_quirk(int width, int height) ...@@ -172,11 +172,10 @@ int drm_get_panel_orientation_quirk(int width, int height)
if (!bios_date) if (!bios_date)
continue; continue;
for (i = 0; data->bios_dates[i]; i++) { i = match_string(data->bios_dates, -1, bios_date);
if (!strcmp(data->bios_dates[i], bios_date)) if (i >= 0)
return data->orientation; return data->orientation;
} }
}
return DRM_MODE_PANEL_ORIENTATION_UNKNOWN; return DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment