mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-29 12:28:27 +02:00
pmdomain: core: add dummy release function to genpd device
commitf64f610ec6upstream. 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. Afterb8f7bbd1f4("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:b8f7bbd1f4("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a45ae89327
commit
cba9d51794
@@ -2141,6 +2141,11 @@ static int genpd_set_default_power_state(struct generic_pm_domain *genpd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void genpd_provider_release(struct device *dev)
|
||||
{
|
||||
/* nothing to be done here */
|
||||
}
|
||||
|
||||
static int genpd_alloc_data(struct generic_pm_domain *genpd)
|
||||
{
|
||||
struct genpd_governor_data *gd = NULL;
|
||||
@@ -2172,6 +2177,7 @@ static int genpd_alloc_data(struct generic_pm_domain *genpd)
|
||||
|
||||
genpd->gd = gd;
|
||||
device_initialize(&genpd->dev);
|
||||
genpd->dev.release = genpd_provider_release;
|
||||
|
||||
if (!genpd_is_dev_name_fw(genpd)) {
|
||||
dev_set_name(&genpd->dev, "%s", genpd->name);
|
||||
|
||||
Reference in New Issue
Block a user