]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PM / OPP: Add reference counting helpers for Rust implementation
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 9 Jan 2024 06:27:48 +0000 (11:57 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 20 Jan 2025 03:35:51 +0000 (09:05 +0530)
commitb489e7946656ed67fea1a30f5103eb62a8686e04
treee947ccde158004797f1b6e28894d97bbb21e97b3
parent1d38eb7f7b26261a0b642f6e0923269c7c000a97
PM / OPP: Add reference counting helpers for Rust implementation

To ensure that resources such as OPP tables or OPP nodes are not freed
while in use by the Rust implementation, it is necessary to increment
their reference count from Rust code.

This commit introduces a new helper function,
dev_pm_opp_get_opp_table_ref(), to increment the reference count of an
OPP table and declares the existing helper dev_pm_opp_get() in pm_opp.h.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
drivers/opp/opp.h
include/linux/pm_opp.h