[PATCH v2 3/3] iio: frequency: ad9523: fix checkpatch warnings for symbolic permissions

From: bhargav

Date: Thu Feb 19 2026 - 15:34:18 EST


The driver currently defines device attributes using
symbolic permission flags (S_IRUGO and S_IWUSR).
Update these to use octal permissions (0444 and 0200) to resolve
checkpatch warnings.

Signed-off-by: bhargav <rougueprince47@xxxxxxxxx>
---
Changes in v2:
- It was suggested in v1 to convert these to
IIO_DEVICE_ATTR_RO() and _WO(). However, those helper macros
expect uniquely named callbacks (e.g. pll1_locked_show),
whereas this driver uses shared multiplexed callbacks
(eg. ad9523_show). Converting to the helpers would require
generating wrapper functions.
Therefore, this v2 keeps IIO_DEVICE_ATTR but updates the
permissions to standard octal format.

drivers/iio/frequency/ad9523.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
index 4d0556ff5601..2a075d09ab83 100644
--- a/drivers/iio/frequency/ad9523.c
+++ b/drivers/iio/frequency/ad9523.c
@@ -558,52 +558,52 @@ static ssize_t ad9523_show(struct device *dev,
return ret;
}

-static IIO_DEVICE_ATTR(pll1_locked, S_IRUGO,
+static IIO_DEVICE_ATTR(pll1_locked, 0444,
ad9523_show,
NULL,
AD9523_STAT_PLL1_LD);

-static IIO_DEVICE_ATTR(pll2_locked, S_IRUGO,
+static IIO_DEVICE_ATTR(pll2_locked, 0444,
ad9523_show,
NULL,
AD9523_STAT_PLL2_LD);

-static IIO_DEVICE_ATTR(pll1_reference_clk_a_present, S_IRUGO,
+static IIO_DEVICE_ATTR(pll1_reference_clk_a_present, 0444,
ad9523_show,
NULL,
AD9523_STAT_REFA);

-static IIO_DEVICE_ATTR(pll1_reference_clk_b_present, S_IRUGO,
+static IIO_DEVICE_ATTR(pll1_reference_clk_b_present, 0444,
ad9523_show,
NULL,
AD9523_STAT_REFB);

-static IIO_DEVICE_ATTR(pll1_reference_clk_test_present, S_IRUGO,
+static IIO_DEVICE_ATTR(pll1_reference_clk_test_present, 0444,
ad9523_show,
NULL,
AD9523_STAT_REF_TEST);

-static IIO_DEVICE_ATTR(vcxo_clk_present, S_IRUGO,
+static IIO_DEVICE_ATTR(vcxo_clk_present, 0444,
ad9523_show,
NULL,
AD9523_STAT_VCXO);

-static IIO_DEVICE_ATTR(pll2_feedback_clk_present, S_IRUGO,
+static IIO_DEVICE_ATTR(pll2_feedback_clk_present, 0444,
ad9523_show,
NULL,
AD9523_STAT_PLL2_FB_CLK);

-static IIO_DEVICE_ATTR(pll2_reference_clk_present, S_IRUGO,
+static IIO_DEVICE_ATTR(pll2_reference_clk_present, 0444,
ad9523_show,
NULL,
AD9523_STAT_PLL2_REF_CLK);

-static IIO_DEVICE_ATTR(sync_dividers, S_IWUSR,
+static IIO_DEVICE_ATTR(sync_dividers, 0200,
NULL,
ad9523_store,
AD9523_SYNC);

-static IIO_DEVICE_ATTR(store_eeprom, S_IWUSR,
+static IIO_DEVICE_ATTR(store_eeprom, 0200,
NULL,
ad9523_store,
AD9523_EEPROM);
--
2.53.0