Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -172,11 +172,10 @@ 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))
		i = match_string(data->bios_dates, -1, bios_date);
		if (i >= 0)
			return data->orientation;
	}
	}

	return DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
}