]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: magnetometer: bmc150_magn: minor formatting cleanup
authorNeel Bullywon <neelb2403@gmail.com>
Mon, 16 Feb 2026 01:54:54 +0000 (20:54 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Feb 2026 08:24:23 +0000 (08:24 +0000)
Improve initializer list style for bmc150_magn_samp_freq_table by
moving the opening brace to its own line and using one entry per line
with proper indentation and spaces inside braces.

Add spaces inside braces for initializer lists in the preset table
for consistency.

Fix indentation of bmc150_magn_scan_masks array. No functional changes.

Signed-off-by: Neel Bullywon <neelb2403@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/magnetometer/bmc150_magn.c

index 4a0582d624d4ff8bb91ea3461c18d809540a10cc..04c4619dfc24e6c7e7c9975e26a22a27546bf9bd 100644 (file)
@@ -148,14 +148,16 @@ struct bmc150_magn_data {
 static const struct {
        int freq;
        u8 reg_val;
-} bmc150_magn_samp_freq_table[] = { {2, 0x01},
-                                   {6, 0x02},
-                                   {8, 0x03},
-                                   {10, 0x00},
-                                   {15, 0x04},
-                                   {20, 0x05},
-                                   {25, 0x06},
-                                   {30, 0x07} };
+} bmc150_magn_samp_freq_table[] = {
+       { 2, 0x01 },
+       { 6, 0x02 },
+       { 8, 0x03 },
+       { 10, 0x00 },
+       { 15, 0x04 },
+       { 20, 0x05 },
+       { 25, 0x06 },
+       { 30, 0x07 },
+};
 
 enum bmc150_magn_presets {
        LOW_POWER_PRESET,
@@ -169,10 +171,10 @@ static const struct bmc150_magn_preset {
        u8 rep_z;
        u8 odr;
 } bmc150_magn_presets_table[] = {
-       [LOW_POWER_PRESET] = {3, 3, 10},
-       [REGULAR_PRESET] =  {9, 15, 10},
-       [ENHANCED_REGULAR_PRESET] =  {15, 27, 10},
-       [HIGH_ACCURACY_PRESET] =  {47, 83, 20},
+       [LOW_POWER_PRESET] = { 3, 3, 10 },
+       [REGULAR_PRESET] = { 9, 15, 10 },
+       [ENHANCED_REGULAR_PRESET] = { 15, 27, 10 },
+       [HIGH_ACCURACY_PRESET] = { 47, 83, 20 },
 };
 
 #define BMC150_MAGN_DEFAULT_PRESET REGULAR_PRESET
@@ -655,8 +657,9 @@ static const struct iio_info bmc150_magn_info = {
 };
 
 static const unsigned long bmc150_magn_scan_masks[] = {
-                                       BIT(AXIS_X) | BIT(AXIS_Y) | BIT(AXIS_Z),
-                                       0};
+       BIT(AXIS_X) | BIT(AXIS_Y) | BIT(AXIS_Z),
+       0
+};
 
 static irqreturn_t bmc150_magn_trigger_handler(int irq, void *p)
 {