Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Rodrigo Siqueira and committed by
Jonathan Cameron
75f800a7 844ed822

+20 -16
+10 -8
drivers/staging/iio/meter/ade7753.c
··· 388 388 ade7753_read_16bit, 389 389 NULL, 390 390 ADE7753_PERIOD); 391 - static IIO_DEV_ATTR_CH_OFF(1, 0644, 392 - ade7753_read_8bit, 393 - ade7753_write_8bit, 394 - ADE7753_CH1OS); 395 - static IIO_DEV_ATTR_CH_OFF(2, 0644, 396 - ade7753_read_8bit, 397 - ade7753_write_8bit, 398 - ADE7753_CH2OS); 391 + 392 + static IIO_DEVICE_ATTR(choff_1, 0644, 393 + ade7753_read_8bit, 394 + ade7753_write_8bit, 395 + ADE7753_CH1OS); 396 + 397 + static IIO_DEVICE_ATTR(choff_2, 0644, 398 + ade7753_read_8bit, 399 + ade7753_write_8bit, 400 + ADE7753_CH2OS); 399 401 400 402 static int ade7753_set_irq(struct device *dev, bool enable) 401 403 {
+10 -8
drivers/staging/iio/meter/ade7759.c
··· 328 328 ade7759_read_16bit, 329 329 ade7759_write_16bit, 330 330 ADE7759_APGAIN); 331 - static IIO_DEV_ATTR_CH_OFF(1, 0644, 332 - ade7759_read_8bit, 333 - ade7759_write_8bit, 334 - ADE7759_CH1OS); 335 - static IIO_DEV_ATTR_CH_OFF(2, 0644, 336 - ade7759_read_8bit, 337 - ade7759_write_8bit, 338 - ADE7759_CH2OS); 331 + 332 + static IIO_DEVICE_ATTR(choff_1, 0644, 333 + ade7759_read_8bit, 334 + ade7759_write_8bit, 335 + ADE7759_CH1OS); 336 + 337 + static IIO_DEVICE_ATTR(choff_2, 0644, 338 + ade7759_read_8bit, 339 + ade7759_write_8bit, 340 + ADE7759_CH2OS); 339 341 340 342 static int ade7759_set_irq(struct device *dev, bool enable) 341 343 {