lkml.org 
[lkml]   [2023]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata()
Date
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.

Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
drivers/iio/trigger/stm32-lptimer-trigger.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c
index 2e447a3f047d..df2416e33375 100644
--- a/drivers/iio/trigger/stm32-lptimer-trigger.c
+++ b/drivers/iio/trigger/stm32-lptimer-trigger.c
@@ -92,8 +92,6 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
if (ret)
return ret;

- platform_set_drvdata(pdev, priv);
-
return 0;
}

--
2.34.1
\
 
 \ /
  Last update: 2023-08-02 14:10    [W:0.245 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site