power: qpnp-fg-gen4: Optimize parsing DT parameters
Currently, while parsing u32 parameters from the device tree,
default values are set only if there is an error. If there is no
error, values read from DT property is set. Fix the redundancy
by setting default value first and then let the value be
overridden when property is read from DT.
Parse reading from revid phandle, child node parameters and
capacity learning parameters from device tree in a separate
function to reduce cyclomatic complexity warnings.
Change-Id: I155c999a12fb9bb124eab7f5de3ea6d3b369c33e
Signed-off-by:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment