…
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