• Crt Mori's avatar
    iio: fetch and enable regulators unconditionally · 67516074
    Crt Mori authored
    This patch is inspired by a comment of Jonathan Cameron on patch of
    Linus Walleij commit aeb55fff ("iio: st_sensors: fetch and enable regulators unconditionally").
    
    The explanation for this change is same as in that patch:
    "Supplies are *not* optional (optional means that the supply is
    optional in the electrical sense, not the software sense) so we need to
    get the and enable them at all times.
    
    If the device tree or board file does not define suitable regulators for
    the component, it will be substituted by a dummy regulator, or, if
    regulators are disabled altogether, by stubs. There is no need to use the
    IS_ERR_OR_NULL() check that is considered harmful.
    Reported-by: default avatarLinus Wallerij <linus.walleij@linaro.org>
    Suggested-by: default avatarJonathan Cameron <jic23@kernel.org>
    Signed-off-by: default avatarCrt Mori <cmo@melexis.com>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    67516074
ms5611_core.c 11 KB