[PATCH v3 2/4] mfd: rz-mtu3: use local variable for reset

From: Cosmin Tanislav

Date: Wed May 27 2026 - 10:57:43 EST


Remove struct rz_mtu3_priv::rstc and use a local variable for it as it
is not needed outside of rz_mtu3_probe() anymore.

Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@xxxxxxxxxxx>
---

V3:
* move the local variable after the core data structures declarations

drivers/mfd/rz-mtu3.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/rz-mtu3.c b/drivers/mfd/rz-mtu3.c
index 6f6ed32e7592..8122355e0e29 100644
--- a/drivers/mfd/rz-mtu3.c
+++ b/drivers/mfd/rz-mtu3.c
@@ -21,7 +21,6 @@

struct rz_mtu3_priv {
void __iomem *mmio;
- struct reset_control *rstc;
spinlock_t lock;
};

@@ -314,6 +313,7 @@ static int rz_mtu3_probe(struct platform_device *pdev)
{
struct rz_mtu3_priv *priv;
struct rz_mtu3 *ddata;
+ struct reset_control *rstc;
unsigned int i;

ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
@@ -330,9 +330,9 @@ static int rz_mtu3_probe(struct platform_device *pdev)
if (IS_ERR(priv->mmio))
return PTR_ERR(priv->mmio);

- priv->rstc = devm_reset_control_get_exclusive_deasserted(&pdev->dev, NULL);
- if (IS_ERR(priv->rstc))
- return PTR_ERR(priv->rstc);
+ rstc = devm_reset_control_get_exclusive_deasserted(&pdev->dev, NULL);
+ if (IS_ERR(rstc))
+ return PTR_ERR(rstc);

ddata->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(ddata->clk))
--
2.54.0