Re: [PATCH v2 1/2] mfd: nct6694: Switch to devm_mfd_add_devices() and drop IDA
From: Bartosz Golaszewski
Date: Wed Apr 08 2026 - 03:25:51 EST
On Wed, Apr 8, 2026 at 7:31 AM <a0282524688@xxxxxxxxx> wrote:
>
> From: Ming Yu <a0282524688@xxxxxxxxx>
>
> Currently, the nct6694 core driver uses mfd_add_hotplug_devices()
> and an IDA to manage subdevice IDs.
>
> Switch the core implementation to use the managed
> devm_mfd_add_devices() API, which simplifies the error handling and
> device lifecycle management. Concurrently, drop the custom IDA
> implementation and transition to using pdev->id.
>
> Signed-off-by: Ming Yu <a0282524688@xxxxxxxxx>
> ---
This does result in a nice code shrink but I'd split this commit into
two: one switching to using MFD_CELL_BASIC() with hard-coded devices
IDs and one completing the transition to devres.
Bart