Re: [PATCH v5 10/15] hwspinlock: handle hwspinlock device allocation in the core

From: Chen-Yu Tsai

Date: Thu Mar 19 2026 - 09:10:46 EST


On Thu, Mar 19, 2026 at 7:00 PM Wolfram Sang
<wsa+renesas@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Providers have been refactored to avoid using core internal structures.
> As a result, they do not need to allocate the hwspinlock device on their
> own anymore because they can access everything they need with helpers.
>
> So, the allocation is moved to the core. As a result, the registering
> functions now return a pointer to the (soon) opaque hwspinlock device
> which may be needed for unregistering only.
>
> Because the argument list of the registering functions is changed, all
> users are changed here as well.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> ---
> Documentation/locking/hwspinlock.rst | 6 ++--
> drivers/hwspinlock/hwspinlock_core.c | 48 +++++++++++++++------------
> drivers/hwspinlock/omap_hwspinlock.c | 10 ++----
> drivers/hwspinlock/qcom_hwspinlock.c | 11 ++----
> drivers/hwspinlock/sprd_hwspinlock.c | 17 ++++------
> drivers/hwspinlock/stm32_hwspinlock.c | 7 ++--

> drivers/hwspinlock/sun6i_hwspinlock.c | 12 ++-----

Acked-by: Chen-Yu Tsai <wens@xxxxxxxxxx> # for sun6i