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: Remove single use of macro definition for regmap name

There is really no reason for having the `regmap` name as a macro
definition if it is only used once directly in `struct regmap_config`.
It is also more readable this way. Remove these macro definitions and
instead use the string literal directly.

Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
Link: https://patch.msgid.link/3a8572de8316c7d2746c2ccea8c478f594221319.1748356671.git.waqar.hameed@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Waqar Hameed and committed by
Jonathan Cameron
851b8544 a8c1039c

+14 -30
+1 -2
drivers/iio/accel/mxc4005.c
··· 19 19 #include <linux/iio/trigger_consumer.h> 20 20 21 21 #define MXC4005_DRV_NAME "mxc4005" 22 - #define MXC4005_REGMAP_NAME "mxc4005_regmap" 23 22 24 23 #define MXC4005_REG_XOUT_UPPER 0x03 25 24 #define MXC4005_REG_XOUT_LOWER 0x04 ··· 136 137 } 137 138 138 139 static const struct regmap_config mxc4005_regmap_config = { 139 - .name = MXC4005_REGMAP_NAME, 140 + .name = "mxc4005_regmap", 140 141 141 142 .reg_bits = 8, 142 143 .val_bits = 8,
+1 -2
drivers/iio/accel/mxc6255.c
··· 17 17 #include <linux/iio/sysfs.h> 18 18 19 19 #define MXC6255_DRV_NAME "mxc6255" 20 - #define MXC6255_REGMAP_NAME "mxc6255_regmap" 21 20 22 21 #define MXC6255_REG_XOUT 0x00 23 22 #define MXC6255_REG_YOUT 0x01 ··· 104 105 } 105 106 106 107 static const struct regmap_config mxc6255_regmap_config = { 107 - .name = MXC6255_REGMAP_NAME, 108 + .name = "mxc6255_regmap", 108 109 109 110 .reg_bits = 8, 110 111 .val_bits = 8,
+1 -2
drivers/iio/chemical/atlas-sensor.c
··· 24 24 #include <linux/iio/triggered_buffer.h> 25 25 #include <linux/pm_runtime.h> 26 26 27 - #define ATLAS_REGMAP_NAME "atlas_regmap" 28 27 #define ATLAS_DRV_NAME "atlas" 29 28 30 29 #define ATLAS_REG_DEV_TYPE 0x00 ··· 95 96 }; 96 97 97 98 static const struct regmap_config atlas_regmap_config = { 98 - .name = ATLAS_REGMAP_NAME, 99 + .name = "atlas_regmap", 99 100 .reg_bits = 8, 100 101 .val_bits = 8, 101 102 };
+1 -2
drivers/iio/health/max30100.c
··· 22 22 #include <linux/iio/buffer.h> 23 23 #include <linux/iio/kfifo_buf.h> 24 24 25 - #define MAX30100_REGMAP_NAME "max30100_regmap" 26 25 #define MAX30100_DRV_NAME "max30100" 27 26 28 27 #define MAX30100_REG_INT_STATUS 0x00 ··· 93 94 } 94 95 95 96 static const struct regmap_config max30100_regmap_config = { 96 - .name = MAX30100_REGMAP_NAME, 97 + .name = "max30100_regmap", 97 98 98 99 .reg_bits = 8, 99 100 .val_bits = 8,
+1 -2
drivers/iio/health/max30102.c
··· 25 25 #include <linux/iio/buffer.h> 26 26 #include <linux/iio/kfifo_buf.h> 27 27 28 - #define MAX30102_REGMAP_NAME "max30102_regmap" 29 28 #define MAX30102_DRV_NAME "max30102" 30 29 #define MAX30102_PART_NUMBER 0x15 31 30 ··· 111 112 }; 112 113 113 114 static const struct regmap_config max30102_regmap_config = { 114 - .name = MAX30102_REGMAP_NAME, 115 + .name = "max30102_regmap", 115 116 116 117 .reg_bits = 8, 117 118 .val_bits = 8,
+1 -2
drivers/iio/light/adux1020.c
··· 23 23 #include <linux/iio/sysfs.h> 24 24 #include <linux/iio/events.h> 25 25 26 - #define ADUX1020_REGMAP_NAME "adux1020_regmap" 27 26 #define ADUX1020_DRV_NAME "adux1020" 28 27 29 28 /* System registers */ ··· 113 114 }; 114 115 115 116 static const struct regmap_config adux1020_regmap_config = { 116 - .name = ADUX1020_REGMAP_NAME, 117 + .name = "adux1020_regmap", 117 118 .reg_bits = 8, 118 119 .val_bits = 16, 119 120 .max_register = 0x6F,
+1 -3
drivers/iio/light/apds9160.c
··· 25 25 26 26 #include <linux/unaligned.h> 27 27 28 - #define APDS9160_REGMAP_NAME "apds9160_regmap" 29 - 30 28 /* Main control register */ 31 29 #define APDS9160_REG_CTRL 0x00 32 30 #define APDS9160_CTRL_SWRESET BIT(4) /* 1: Activate reset */ ··· 159 161 }; 160 162 161 163 static const struct regmap_config apds9160_regmap_config = { 162 - .name = APDS9160_REGMAP_NAME, 164 + .name = "apds9160_regmap", 163 165 .reg_bits = 8, 164 166 .val_bits = 8, 165 167 .use_single_read = true,
+1 -2
drivers/iio/light/apds9960.c
··· 25 25 #include <linux/iio/kfifo_buf.h> 26 26 #include <linux/iio/sysfs.h> 27 27 28 - #define APDS9960_REGMAP_NAME "apds9960_regmap" 29 28 #define APDS9960_DRV_NAME "apds9960" 30 29 31 30 #define APDS9960_REG_RAM_START 0x00 ··· 220 221 }; 221 222 222 223 static const struct regmap_config apds9960_regmap_config = { 223 - .name = APDS9960_REGMAP_NAME, 224 + .name = "apds9960_regmap", 224 225 .reg_bits = 8, 225 226 .val_bits = 8, 226 227 .use_single_read = true,
+1 -2
drivers/iio/light/jsa1212.c
··· 106 106 #define JSA1212_PXS_DELAY_MS 100 107 107 108 108 #define JSA1212_DRIVER_NAME "jsa1212" 109 - #define JSA1212_REGMAP_NAME "jsa1212_regmap" 110 109 111 110 enum jsa1212_op_mode { 112 111 JSA1212_OPMODE_ALS_EN, ··· 299 300 } 300 301 301 302 static const struct regmap_config jsa1212_regmap_config = { 302 - .name = JSA1212_REGMAP_NAME, 303 + .name = "jsa1212_regmap", 303 304 .reg_bits = 8, 304 305 .val_bits = 8, 305 306 .max_register = JSA1212_MAX_REG,
+1 -3
drivers/iio/light/ltr501.c
··· 63 63 #define LTR501_ALS_DEF_PERIOD 500000 64 64 #define LTR501_PS_DEF_PERIOD 100000 65 65 66 - #define LTR501_REGMAP_NAME "ltr501_regmap" 67 - 68 66 #define LTR501_LUX_CONV(vis_coeff, vis_data, ir_coeff, ir_data) \ 69 67 ((vis_coeff * vis_data) - (ir_coeff * ir_data)) 70 68 ··· 1400 1402 } 1401 1403 1402 1404 static const struct regmap_config ltr501_regmap_config = { 1403 - .name = LTR501_REGMAP_NAME, 1405 + .name = "ltr501_regmap", 1404 1406 .reg_bits = 8, 1405 1407 .val_bits = 8, 1406 1408 .max_register = LTR501_MAX_REG,
+1 -2
drivers/iio/light/rpr0521.c
··· 69 69 #define RPR0521_DEFAULT_MEAS_TIME 0x06 /* ALS - 100ms, PXS - 100ms */ 70 70 71 71 #define RPR0521_DRV_NAME "RPR0521" 72 - #define RPR0521_REGMAP_NAME "rpr0521_regmap" 73 72 74 73 #define RPR0521_SLEEP_DELAY_MS 2000 75 74 ··· 912 913 } 913 914 914 915 static const struct regmap_config rpr0521_regmap_config = { 915 - .name = RPR0521_REGMAP_NAME, 916 + .name = "rpr0521_regmap", 916 917 917 918 .reg_bits = 8, 918 919 .val_bits = 8,
+1 -2
drivers/iio/light/stk3310.c
··· 46 46 #define STK3310_PS_MAX_VAL 0xFFFF 47 47 48 48 #define STK3310_DRIVER_NAME "stk3310" 49 - #define STK3310_REGMAP_NAME "stk3310_regmap" 50 49 51 50 #define STK3310_SCALE_AVAILABLE "6.4 1.6 0.4 0.1" 52 51 ··· 525 526 } 526 527 527 528 static const struct regmap_config stk3310_regmap_config = { 528 - .name = STK3310_REGMAP_NAME, 529 + .name = "stk3310_regmap", 529 530 .reg_bits = 8, 530 531 .val_bits = 8, 531 532 .max_register = STK3310_MAX_REG,
+1 -2
drivers/iio/light/vcnl4035.c
··· 23 23 #include <linux/iio/triggered_buffer.h> 24 24 25 25 #define VCNL4035_DRV_NAME "vcnl4035" 26 - #define VCNL4035_REGMAP_NAME "vcnl4035_regmap" 27 26 28 27 /* Device registers */ 29 28 #define VCNL4035_ALS_CONF 0x00 ··· 501 502 } 502 503 503 504 static const struct regmap_config vcnl4035_regmap_config = { 504 - .name = VCNL4035_REGMAP_NAME, 505 + .name = "vcnl4035_regmap", 505 506 .reg_bits = 8, 506 507 .val_bits = 16, 507 508 .max_register = VCNL4035_DEV_ID,
+1 -2
drivers/iio/magnetometer/mmc35240.c
··· 21 21 #include <linux/iio/sysfs.h> 22 22 23 23 #define MMC35240_DRV_NAME "mmc35240" 24 - #define MMC35240_REGMAP_NAME "mmc35240_regmap" 25 24 26 25 #define MMC35240_REG_XOUT_L 0x00 27 26 #define MMC35240_REG_XOUT_H 0x01 ··· 462 463 }; 463 464 464 465 static const struct regmap_config mmc35240_regmap_config = { 465 - .name = MMC35240_REGMAP_NAME, 466 + .name = "mmc35240_regmap", 466 467 467 468 .reg_bits = 8, 468 469 .val_bits = 8,