summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-04-02 19:49:10 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-04-07 09:36:38 +0200
commitebb9493c07e1bb3d7a443b32954f7ddf7f971d57 (patch)
treeb77a5616072daf35f1a466d9fa03dcee3f470db8 /drivers/iio
parentiio: adc: stm32-dfsdm: drop __func__ while using Dynamic debug (diff)
downloadlinux-ebb9493c07e1bb3d7a443b32954f7ddf7f971d57.tar.xz
linux-ebb9493c07e1bb3d7a443b32954f7ddf7f971d57.zip
iio: trigger: Replace explicit casting and wrong specifier with proper one
By unknown reason device name is set with an index casted from int to unsigned long while at the same time with "%ld" specifier. Both parts seems wrong to me, thus replace replace explicit casting and wrong specifier with proper one, i.e. "%d". Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210402174911.44408-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/industrialio-trigger.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index efeb5e2eca8a..444d3acc83f4 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -75,8 +75,7 @@ int __iio_trigger_register(struct iio_trigger *trig_info,
return trig_info->id;
/* Set the name used for the sysfs directory etc */
- dev_set_name(&trig_info->dev, "trigger%ld",
- (unsigned long) trig_info->id);
+ dev_set_name(&trig_info->dev, "trigger%d", trig_info->id);
ret = device_add(&trig_info->dev);
if (ret)