Skip to contentSkip to conversation

reset: ti: syscon: remove unneeded call to platform_set_drvdata()

PATCH Applied Andrei Coardos 4 participants 4 messages Aug 7, 2023 – Aug 8, 2023 Reset controller framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: ti: syscon: remove unneeded call to platform_set_drvdata()

This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file.

---
 drivers/reset/reset-ti-syscon.c | 2 --
 1 file changed, 2 deletions(-)
drivers/reset/reset-ti-syscon.c +0 -2
index f0dd7ffc3b72..23f86ddb8668 100644
@@ -204,8 +204,6 @@ static int ti_syscon_reset_probe(struct platform_device *pdev)
 	data->controls = controls;
 	data->nr_controls = nr_controls;
 
-	platform_set_drvdata(pdev, data);
-
 	return devm_reset_controller_register(dev, &data->rcdev);
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Andrei Coardos

This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file.

// also adding the people listed as MODULE_AUTHOR
// the list seems a bit short otherwise; no idea if these emails work

Quoted 21 lines
---
 drivers/reset/reset-ti-syscon.c | 2 --
 1 file changed, 2 deletions(-)
drivers/reset/reset-ti-syscon.c +0 -3
index f0dd7ffc3b72..23f86ddb8668 100644
@@ -204,8 +204,6 @@ static int ti_syscon_reset_probe(struct platform_device *pdev)
        data->controls = controls;
        data->nr_controls = nr_controls;
 
-       platform_set_drvdata(pdev, data);
-
        return devm_reset_controller_register(dev, &data->rcdev);
 }
 
--

2.34.1

Acked-by
#2 lore raw
Quoted 8 lines · Alexandru Ardelean
Quoted 6 lines · Andrei Coardos

This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file.

Quoted 7 lines

// also adding the people listed as MODULE_AUTHOR
// the list seems a bit short otherwise; no idea if these emails work

Quoted 2 lines

---

LGTM,

Quoted 19 lines
Quoted 19 lines
  drivers/reset/reset-ti-syscon.c | 2 --
  1 file changed, 2 deletions(-)
drivers/reset/reset-ti-syscon.c +0 -3
index f0dd7ffc3b72..23f86ddb8668 100644
@@ -204,8 +204,6 @@ static int ti_syscon_reset_probe(struct platform_device *pdev)
         data->controls = controls;
         data->nr_controls = nr_controls;
 
-       platform_set_drvdata(pdev, data);
-
         return devm_reset_controller_register(dev, &data->rcdev);
  }
 
--

2.34.1

maintainer Applied
#3 lore raw
In reply to Andrei Coardos
Quoted 6 lines · Andrei Coardos

This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file.

Thank you, applied to reset/next.

regards
Philipp