Skip to contentSkip to conversation

gpio: eic-sprd: remove unneeded platform_set_drvdata() call

PATCH Applied Andrei Coardos 4 participants 4 messages Jul 17, 2023 – Jul 29, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: eic-sprd: remove unneeded platform_set_drvdata() call

The platform_set_drvdata() call was never used, ever since the driver was originally added.
It looks like this copy+paste left-over. Possibly the author copied from a driver that had this line, but also had a remove hook.

---
 drivers/gpio/gpio-eic-sprd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpio/gpio-eic-sprd.c +0 -1
index 84352a6f4973..53db88ae2a20 100644
@@ -653,7 +653,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	platform_set_drvdata(pdev, sprd_eic);
 	return 0;
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andrei Coardos

The platform_set_drvdata() call was never used, ever since the driver was originally added.
It looks like this copy+paste left-over. Possibly the author copied from a driver that had this line, but also had a remove hook.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrei Coardos
Quoted 7 lines · Andrei Coardos

The platform_set_drvdata() call was never used, ever since the driver was originally added.
It looks like this copy+paste left-over. Possibly the author copied from a driver that had this line, but also had a remove hook.

LGTM. Thanks.

Quoted 16 lines
---
  drivers/gpio/gpio-eic-sprd.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpio/gpio-eic-sprd.c +0 -1
index 84352a6f4973..53db88ae2a20 100644
@@ -653,7 +653,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
  		return ret;
  	}
 
-	platform_set_drvdata(pdev, sprd_eic);
  	return 0;
  }
 
#3 lore raw
In reply to Andrei Coardos
Quoted 25 lines · Andrei Coardos

The platform_set_drvdata() call was never used, ever since the driver was originally added.
It looks like this copy+paste left-over. Possibly the author copied from a driver that had this line, but also had a remove hook.

---
 drivers/gpio/gpio-eic-sprd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpio/gpio-eic-sprd.c +0 -2
index 84352a6f4973..53db88ae2a20 100644
@@ -653,7 +653,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
                return ret;
        }
 
-       platform_set_drvdata(pdev, sprd_eic);
        return 0;
 }
 
--
Quoted 2 lines

2.34.1

Applied, thanks!

Bart