Skip to content

Commit f64f610

Browse files
lynxeye-devstorulf
authored andcommitted
pmdomain: core: add dummy release function to genpd device
The genpd device, which is really only used as a handle to lookup OPP, but not even registered to the device core otherwise and thus lifetime linked to the genpd struct it is contained in, is missing a release function. After b8f7bbd ("pmdomain: core: Add missing put_device()") the device will be cleaned up going through the driver core device_release() function, which will warn when no release callback is present for the device. Add a dummy release function to shut up the warning. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Fixes: b8f7bbd ("pmdomain: core: Add missing put_device()") Cc: stable@vger.kernel.org Message-ID: <20241218184433.1930532-1-l.stach@pengutronix.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 469c068 commit f64f610

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/pmdomain/core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,6 +2142,11 @@ static int genpd_set_default_power_state(struct generic_pm_domain *genpd)
21422142
return 0;
21432143
}
21442144

2145+
static void genpd_provider_release(struct device *dev)
2146+
{
2147+
/* nothing to be done here */
2148+
}
2149+
21452150
static int genpd_alloc_data(struct generic_pm_domain *genpd)
21462151
{
21472152
struct genpd_governor_data *gd = NULL;
@@ -2173,6 +2178,7 @@ static int genpd_alloc_data(struct generic_pm_domain *genpd)
21732178

21742179
genpd->gd = gd;
21752180
device_initialize(&genpd->dev);
2181+
genpd->dev.release = genpd_provider_release;
21762182

21772183
if (!genpd_is_dev_name_fw(genpd)) {
21782184
dev_set_name(&genpd->dev, "%s", genpd->name);

0 commit comments

Comments
 (0)