mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-06-08 06:20:14 -04:00
iio: adc: ad4030: replace sprintf() with sysfs_emit()
Update the ad4030_read_label() function to use sysfs_emit() for generating labels. Signed-off-by: Nuno Sá <nuno.sal@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
committed by
Jonathan Cameron
parent
67f31f0b5f
commit
ed1a82401b
@@ -852,8 +852,8 @@ static int ad4030_read_label(struct iio_dev *indio_dev,
|
||||
char *label)
|
||||
{
|
||||
if (chan->differential)
|
||||
return sprintf(label, "differential%lu\n", chan->address);
|
||||
return sprintf(label, "common-mode%lu\n", chan->address);
|
||||
return sysfs_emit(label, "differential%lu\n", chan->address);
|
||||
return sysfs_emit(label, "common-mode%lu\n", chan->address);
|
||||
}
|
||||
|
||||
static int ad4030_get_current_scan_type(const struct iio_dev *indio_dev,
|
||||
|
||||
Reference in New Issue
Block a user