Skip to content

Commit 1a2e369

Browse files
passgatstorulf
authored andcommitted
pmdomain: imx93-pd: drop the context variable "init_off"
This variable is only used within the probe() function, so let's remove it from the context and define it locally within the same function. Signed-off-by: Dario Binacchi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 28717ec commit 1a2e369

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/pmdomain/imx/imx93-pd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ struct imx93_power_domain {
2828
void __iomem *addr;
2929
struct clk_bulk_data *clks;
3030
int num_clks;
31-
bool init_off;
3231
};
3332

3433
#define to_imx93_pd(_genpd) container_of(_genpd, struct imx93_power_domain, genpd)
@@ -99,6 +98,7 @@ static int imx93_pd_probe(struct platform_device *pdev)
9998
struct device *dev = &pdev->dev;
10099
struct device_node *np = dev->of_node;
101100
struct imx93_power_domain *domain;
101+
bool init_off;
102102
int ret;
103103

104104
domain = devm_kzalloc(dev, sizeof(*domain), GFP_KERNEL);
@@ -118,17 +118,17 @@ static int imx93_pd_probe(struct platform_device *pdev)
118118
domain->genpd.power_on = imx93_pd_on;
119119
domain->dev = dev;
120120

121-
domain->init_off = readl(domain->addr + MIX_FUNC_STAT_OFF) & FUNC_STAT_ISO_STAT_MASK;
121+
init_off = readl(domain->addr + MIX_FUNC_STAT_OFF) & FUNC_STAT_ISO_STAT_MASK;
122122
/* Just to sync the status of hardware */
123-
if (!domain->init_off) {
123+
if (!init_off) {
124124
ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks);
125125
if (ret)
126126
return dev_err_probe(domain->dev, ret,
127127
"failed to enable clocks for domain: %s\n",
128128
domain->genpd.name);
129129
}
130130

131-
ret = pm_genpd_init(&domain->genpd, NULL, domain->init_off);
131+
ret = pm_genpd_init(&domain->genpd, NULL, init_off);
132132
if (ret)
133133
goto err_clk_unprepare;
134134

@@ -144,7 +144,7 @@ static int imx93_pd_probe(struct platform_device *pdev)
144144
pm_genpd_remove(&domain->genpd);
145145

146146
err_clk_unprepare:
147-
if (!domain->init_off)
147+
if (!init_off)
148148
clk_bulk_disable_unprepare(domain->num_clks, domain->clks);
149149

150150
return ret;

0 commit comments

Comments
 (0)