Commit 75f800a7 authored by Rodrigo Siqueira's avatar Rodrigo Siqueira Committed by Jonathan Cameron
Browse files

staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR



The macro IIO_DEV_ATTR_CH_OFF is a wrapper for IIO_DEVICE_ATTR, with a
tiny change in the name definition. This extra macro does not improve
the readability and also creates some checkpatch errors.

This patch fixes the checkpatch.pl errors:

staging/iio/meter/ade7753.c:391: ERROR: Use 4 digit octal (0777) not
decimal permissions
staging/iio/meter/ade7753.c:395: ERROR: Use 4 digit octal (0777) not
decimal permissions
staging/iio/meter/ade7759.c:331: ERROR: Use 4 digit octal (0777) not
decimal permissions
staging/iio/meter/ade7759.c:335: ERROR: Use 4 digit octal (0777) not
decimal permissions

Signed-off-by: default avatarRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 844ed822
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -388,11 +388,13 @@ static IIO_DEV_ATTR_VPERIOD(0444,
		ade7753_read_16bit,
		NULL,
		ADE7753_PERIOD);
static IIO_DEV_ATTR_CH_OFF(1, 0644,

static IIO_DEVICE_ATTR(choff_1, 0644,
			ade7753_read_8bit,
			ade7753_write_8bit,
			ADE7753_CH1OS);
static IIO_DEV_ATTR_CH_OFF(2, 0644,

static IIO_DEVICE_ATTR(choff_2, 0644,
			ade7753_read_8bit,
			ade7753_write_8bit,
			ADE7753_CH2OS);
+10 −8
Original line number Diff line number Diff line
@@ -328,11 +328,13 @@ static IIO_DEV_ATTR_ACTIVE_POWER_GAIN(0644,
		ade7759_read_16bit,
		ade7759_write_16bit,
		ADE7759_APGAIN);
static IIO_DEV_ATTR_CH_OFF(1, 0644,

static IIO_DEVICE_ATTR(choff_1, 0644,
			ade7759_read_8bit,
			ade7759_write_8bit,
			ADE7759_CH1OS);
static IIO_DEV_ATTR_CH_OFF(2, 0644,

static IIO_DEVICE_ATTR(choff_2, 0644,
			ade7759_read_8bit,
			ade7759_write_8bit,
			ADE7759_CH2OS);