On Thu, May 03, 2018 at 09:41:19PM +0300, Andy Shevchenko wrote:
> The new helper returns index of the matching string in an array.
> We are going to use it here.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com>

Reviewed-by: Sean Paul <seanp...@chromium.org>

> ---
>  drivers/gpu/drm/drm_panel_orientation_quirks.c | 7 +++----
>  1 file 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;
> -- 
> 2.17.0
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to