summaryrefslogtreecommitdiff
path: root/drivers/iio/trigger
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-04-13 21:56:56 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-06-11 16:35:25 +0300
commitbf5ff730dcc2540d39ed572f551f79524c4d7eb8 (patch)
tree6f64a8f6f68769f56549c83c5671b91850c03592 /drivers/iio/trigger
parentf2906aa863381afb0015a9eb7fefad885d4e5a56 (diff)
downloadlinux-bf5ff730dcc2540d39ed572f551f79524c4d7eb8.tar.xz
iio: trigger: stm32-lptimer-trigger: Make use of device properties
Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20220413185656.21994-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/trigger')
-rw-r--r--drivers/iio/trigger/stm32-lptimer-trigger.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c b/drivers/iio/trigger/stm32-lptimer-trigger.c
index 98cdc7e47f3d..af46c10cea92 100644
--- a/drivers/iio/trigger/stm32-lptimer-trigger.c
+++ b/drivers/iio/trigger/stm32-lptimer-trigger.c
@@ -13,6 +13,7 @@
#include <linux/mfd/stm32-lptimer.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
/* List Low-Power Timer triggers */
static const char * const stm32_lptim_triggers[] = {
@@ -77,7 +78,7 @@ static int stm32_lptim_trigger_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
- if (of_property_read_u32(pdev->dev.of_node, "reg", &index))
+ if (device_property_read_u32(&pdev->dev, "reg", &index))
return -EINVAL;
if (index >= ARRAY_SIZE(stm32_lptim_triggers))