Commit d866f140 authored by Andrei Coardos's avatar Andrei Coardos Committed by Jonathan Cameron
Browse files

iio: trigger: stm32-lptimer-trigger: remove unneeded 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.

Reviewed-by: default avatarAlexandru Ardelean <alex@shruggie.ro>
Signed-off-by: default avatarAndrei Coardos <aboutphysycs@gmail.com>
Link: https://lore.kernel.org/r/20230802120915.25631-1-aboutphysycs@gmail.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent e19480dd
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
{
	struct stm32_lptim_trigger *priv;
	u32 index;
	int ret;

	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
	if (!priv)
@@ -88,13 +87,7 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
	priv->dev = &pdev->dev;
	priv->trg = stm32_lptim_triggers[index];

	ret = stm32_lptim_setup_trig(priv);
	if (ret)
		return ret;

	platform_set_drvdata(pdev, priv);

	return 0;
	return stm32_lptim_setup_trig(priv);
}

static const struct of_device_id stm32_lptim_trig_of_match[] = {