Re: [PATCH 8/8] iio: adc: hx711: Switch from of specific to fwnode property handling.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Sun, Feb 18, 2024 at 05:27:31PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Allows driver to be used with other firmware types and removes an
> example that might be copied into new IIO drivers.


>  	struct device *dev = &pdev->dev;


> -	ret = of_property_read_u32(np, "clock-frequency",
> +	ret = device_property_read_u32(&pdev->dev, "clock-frequency",
>  					&hx711_data->clock_frequency);

You have dev, use it!

	ret = device_property_read_u32(dev, "clock-frequency",

Also seems the indentation of the second line is broken.

With Best Regards,
Andy Shevchenko

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     []

  Powered by Linux