]> git.baikalelectronics.ru Git - kernel.git/commit
drm/komeda: Refine function to_d71_input_id
authorjames qian wang (Arm Technology China) <james.qian.wang@arm.com>
Fri, 24 May 2019 02:55:45 +0000 (03:55 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Wed, 19 Jun 2019 10:42:17 +0000 (11:42 +0100)
commit305caf1b900e4b294f003c602171b999dc1a024b
treef55a3e34c5809bdb719e2e0b591676b21b1d7798
parent7c1a17a0f84476ec2ded4bd65a60f73f0743c338
drm/komeda: Refine function to_d71_input_id

Since the component_state->input[i] is only valid when it is active, the
content of input[i] is undefined if it is inactive. The user must check the
state->active_inputs with input index firstly before using state->input[i].
Refine the function to_d71_input_id and directly move such check into it.
Simplify the using and avoid problem that caller forget the valid check.

Depends on:
- https://patchwork.freedesktop.org/series/60856/

Signed-off-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
drivers/gpu/drm/arm/display/komeda/d71/d71_component.c