diff mbox series

[01/10] iio: adc: mcp3911: correct "microchip,device-addr" property

Message ID 20220623170844.2189814-1-marcus.folkesson@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series [01/10] iio: adc: mcp3911: correct "microchip,device-addr" property | expand

Commit Message

Marcus Folkesson June 23, 2022, 5:08 p.m. UTC
Go for the right property name that is documented in the bindings.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/iio/adc/mcp3911.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko June 23, 2022, 6:59 p.m. UTC | #1
On Thu, Jun 23, 2022 at 7:40 PM Marcus Folkesson
<marcus.folkesson@gmail.com> wrote:
>
> Go for the right property name that is documented in the bindings.

If the driver is already for a while in the kernel, I'm afraid we may
not do this, since it's part of ABI (firmware <--> OS). You can add a
new property and try it first.
diff mbox series

Patch

diff --git a/drivers/iio/adc/mcp3911.c b/drivers/iio/adc/mcp3911.c
index 1cb4590fe412..4338552cd0ca 100644
--- a/drivers/iio/adc/mcp3911.c
+++ b/drivers/iio/adc/mcp3911.c
@@ -208,7 +208,7 @@  static int mcp3911_config(struct mcp3911 *adc)
 	u32 configreg;
 	int ret;
 
-	device_property_read_u32(dev, "device-addr", &adc->dev_addr);
+	device_property_read_u32(dev, "microchip,device-addr", &adc->dev_addr);
 	if (adc->dev_addr > 3) {
 		dev_err(&adc->spi->dev,
 			"invalid device address (%i). Must be in range 0-3.\n",