diff options
| author | David Francis <[email protected]> | 2018-08-03 17:24:28 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2018-08-27 20:21:11 +0000 |
| commit | 9bbf6a5341092e8a9b4e7b02bea6721e29ced9ef (patch) | |
| tree | 5ae206b9b1da0be28df5a65e5a24500a868d1f08 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm/amd/display: support 48 MHZ refclk off (diff) | |
| download | kernel-9bbf6a5341092e8a9b4e7b02bea6721e29ced9ef.tar.gz kernel-9bbf6a5341092e8a9b4e7b02bea6721e29ced9ef.zip | |
drm/amd/display: Flatten unnecessary i2c functions
[Why]
The dce_i2c_hw code contained four funtcions that were only
called in one place and did not have a clearly delineated
purpose.
[How]
Inline these functions, keeping the same functionality.
This is not a functional change.
The functions disable_i2c_hw_engine and release_engine_dce_hw were
pulled into their respective callers.
The most interesting part of this change is the acquire functions.
dce_i2c_hw_engine_acquire_engine was pulled into
dce_i2c_engine_acquire_hw, and dce_i2c_engine_acquire_hw was pulled
into acquire_i2c_hw_engine.
Some notes to show that this change is not functional:
-Failure conditions in any function resulted in a cascade of calls that
ended in a 'return NULL'.
Those are replaced with a direct 'return NULL'.
-The variable result is the one from dce_i2c_hw_engine_acquire_engine.
The boolean result used as part of return logic was removed.
-As the second half of dce_i2c_hw_engine_acquire_engine is only executed
if that function is returning true and therefore exiting the do-while
loop in dce_i2c_engine_acquire_hw, those lines were moved outside
of the loop.
Signed-off-by: David Francis <[email protected]>
Acked-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
