mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
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>
This commit is contained in:
parent
bb142d4433
commit
ebb9493c07
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue