Thread (10 messages) 10 messages, 5 authors, 2026-08-03

Re: [PATCH v4 2/3] iio: adc: bcm_iproc_adc: Introduce local device pointer

From: Markus Elfring <hidden>
Date: 2026-08-03 12:45:13
Also in: linux-iio, lkml

…
quoted hunk ↗ jump to hunk
+++ b/drivers/iio/adc/bcm_iproc_adc.c
@@ -506,9 +506,10 @@ static int iproc_adc_probe(struct platform_device *pdev)
 {
 	struct iproc_adc_priv *adc_priv;
 	struct iio_dev *indio_dev = NULL;
+	struct device *dev = &pdev->dev;
 	int ret;
 
-	indio_dev = devm_iio_device_alloc(&pdev->dev,
+	indio_dev = devm_iio_device_alloc(dev,
 					sizeof(*adc_priv));
…

Would an other adjustment be a bit nicer?

+	indio_dev = devm_iio_device_alloc(dev, sizeof(*adc_priv));


…
quoted hunk ↗ jump to hunk
@@ -523,14 +524,14 @@ static int iproc_adc_probe(struct platform_device *pdev)
 	adc_priv->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
 			   "adc-syscon");
 	if (IS_ERR(adc_priv->regmap)) {
-		dev_err(&pdev->dev, "failed to get handle for tsc syscon\n");
+		dev_err(dev, "failed to get handle for tsc syscon\n");
 		ret = PTR_ERR(adc_priv->regmap);
 		return ret;
 	}
…

Can further source code refinements become helpful here?

Regards,
Markus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help