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
This commit is contained in:
parent
2f065d8ae9
commit
818c05d8e2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user