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

Configure Feed

Select the types of activity you want to include in your feed.

iio: magnetometer: bmc150_magn: minor formatting cleanup

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>

authored by

Neel Bullywon and committed by
Jonathan Cameron
094d5d37 d1fa7b31

+17 -14
+17 -14
drivers/iio/magnetometer/bmc150_magn.c
··· 148 148 static const struct { 149 149 int freq; 150 150 u8 reg_val; 151 - } bmc150_magn_samp_freq_table[] = { {2, 0x01}, 152 - {6, 0x02}, 153 - {8, 0x03}, 154 - {10, 0x00}, 155 - {15, 0x04}, 156 - {20, 0x05}, 157 - {25, 0x06}, 158 - {30, 0x07} }; 151 + } bmc150_magn_samp_freq_table[] = { 152 + { 2, 0x01 }, 153 + { 6, 0x02 }, 154 + { 8, 0x03 }, 155 + { 10, 0x00 }, 156 + { 15, 0x04 }, 157 + { 20, 0x05 }, 158 + { 25, 0x06 }, 159 + { 30, 0x07 }, 160 + }; 159 161 160 162 enum bmc150_magn_presets { 161 163 LOW_POWER_PRESET, ··· 171 169 u8 rep_z; 172 170 u8 odr; 173 171 } bmc150_magn_presets_table[] = { 174 - [LOW_POWER_PRESET] = {3, 3, 10}, 175 - [REGULAR_PRESET] = {9, 15, 10}, 176 - [ENHANCED_REGULAR_PRESET] = {15, 27, 10}, 177 - [HIGH_ACCURACY_PRESET] = {47, 83, 20}, 172 + [LOW_POWER_PRESET] = { 3, 3, 10 }, 173 + [REGULAR_PRESET] = { 9, 15, 10 }, 174 + [ENHANCED_REGULAR_PRESET] = { 15, 27, 10 }, 175 + [HIGH_ACCURACY_PRESET] = { 47, 83, 20 }, 178 176 }; 179 177 180 178 #define BMC150_MAGN_DEFAULT_PRESET REGULAR_PRESET ··· 657 655 }; 658 656 659 657 static const unsigned long bmc150_magn_scan_masks[] = { 660 - BIT(AXIS_X) | BIT(AXIS_Y) | BIT(AXIS_Z), 661 - 0}; 658 + BIT(AXIS_X) | BIT(AXIS_Y) | BIT(AXIS_Z), 659 + 0 660 + }; 662 661 663 662 static irqreturn_t bmc150_magn_trigger_handler(int irq, void *p) 664 663 {