diff options
author | Stephen Boyd <[email protected]> | 2022-03-31 14:04:25 -0700 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2022-04-04 09:19:01 +0100 |
commit | 74a53a959028e5f28e3c0e9445a876e5c8da147c (patch) | |
tree | f44e2c8d569f8f9e888fc40fb2a52343bd5e1854 /lib/netdev-notifier-error-inject.c | |
parent | 03779df928a6b34e18b28c17c94627fe014304b3 (diff) |
iio:proximity:sx_common: Fix device property parsing on DT systems
After commit 7a3605bef878 ("iio: sx9310: Support ACPI property") we
started using the 'indio_dev->dev' to extract device properties for
various register settings in sx9310_get_default_reg(). This broke DT
based systems because dev_fwnode() used in the device_property*() APIs
can't find an 'of_node'. That's because the 'indio_dev->dev.of_node'
pointer isn't set until iio_device_register() is called. Set the pointer
earlier, next to where the ACPI companion is set, so that the device
property APIs work on DT systems.
Cc: Gwendal Grignou <[email protected]>
Fixes: 7a3605bef878 ("iio: sx9310: Support ACPI property")
Signed-off-by: Stephen Boyd <[email protected]>
Reviewed-by: Gwendal Grignou <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions