]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mfd: rz-mtu3: Use local variable for reset
authorCosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Wed, 27 May 2026 14:56:04 +0000 (17:56 +0300)
committerLee Jones <lee@kernel.org>
Wed, 17 Jun 2026 10:33:03 +0000 (11:33 +0100)
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@renesas.com>
Link: https://patch.msgid.link/20260527145606.136536-3-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/rz-mtu3.c

index 6f6ed32e759227fe96fd19a07c3001eb325741ee..8122355e0e2969096bf596318bca63eea9d71e55 100644 (file)
@@ -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))