]> git.baikalelectronics.ru Git - kernel.git/commit
iio: core: Allow drivers to specify a label without it coming from of
authorHans de Goede <hdegoede@redhat.com>
Sun, 7 Feb 2021 16:08:59 +0000 (17:08 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 11 Mar 2021 20:46:59 +0000 (20:46 +0000)
commit2c392958dc0abbec66da1663fe07210c64c2102c
treeb4565b2002801af77911b261e20429e60cc92c9a
parent359d8c0fe1893d51ae7fa1ade1172cca41691550
iio: core: Allow drivers to specify a label without it coming from of

Only set indio_dev->label from of/dt if there actually is a label
specified in of.

This allows drivers to set a label without this being overwritten with
NULL when there is no label specified in of. This is esp. useful on
devices where of is not used at all, such as your typical x86/ACPI device.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20210207160901.110643-2-hdegoede@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c