Re: [PATCH v2 1/8] mfd / platform: cros_ec: use devm_mfd_add_devices.

From: Guenter Roeck
Date: Mon Nov 26 2018 - 13:04:18 EST


Hi Enric,

On Mon, Nov 26, 2018 at 9:52 AM Enric Balletbo i Serra
<enric.balletbo@xxxxxxxxxxxxx> wrote:
>
> Use devm_mfd_add_devices() for adding cros-ec core MFD child devices. This
> reduces the need of remove callback from platform/chrome for removing the
> MFD child devices.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@xxxxxxxxxxxxx>
> ---
>
> Changes in v2:
> - Use devm only for the cros-ec core.
>
...

> -int cros_ec_remove(struct cros_ec_device *ec_dev)
> -{
> - mfd_remove_devices(ec_dev->dev);
> -
> - return 0;
> -}
> -EXPORT_SYMBOL(cros_ec_remove);
> -

You should also remove the function declaration from
include/linux/mfd/cros_ec.h.

Guenter