Re: [PATCH 3/7] mfd: max77686: Use devm_mfd_add_devices and devm_regmap_add_irq_chip

Krzysztof Kozlowski
2016-04-25T10:57:08Z

On 04/21/2016 02:25 PM, Laxman Dewangan wrote:
> Use devm_mfd_add_devices() for adding MFD child devices and
> devm_regmap_add_irq_chip() for IRQ chip registration.
>
> This reduces the error code path and .remove callback for removing
> MFD child devices and deleting IRQ chip data.
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> CC: Chanwoo Choi <cw00.choi@samsung.com>
> CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
> drivers/mfd/max77686.c | 31 ++++++++-----------------------
> 1 file changed, 8 insertions(+), 23 deletions(-)

Switching existing code to devm-like interface doesn't bring huge
benefits but looks okay and I'm fine with it:

Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof