Skip to content

Commit ada2b49

Browse files
andredlag-linaro
authored andcommitted
mfd: sec-i2c: Sort struct of_device_id entries and the device type switch
Sort struct of_device_id entries and the device type switch in _probe() alphabetically, which makes it easier to find the right place where to insert new entries in the future. Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: André Draszik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent d58b81c commit ada2b49

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/mfd/sec-i2c.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ static int sec_pmic_i2c_probe(struct i2c_client *client)
154154
case S2MPS15X:
155155
regmap = &s2mps15_regmap_config;
156156
break;
157-
case S5M8767X:
158-
regmap = &s5m8767_regmap_config;
159-
break;
160157
case S2MPU02:
161158
regmap = &s2mpu02_regmap_config;
162159
break;
160+
case S5M8767X:
161+
regmap = &s5m8767_regmap_config;
162+
break;
163163
default:
164164
regmap = &sec_regmap_config;
165165
break;
@@ -184,11 +184,11 @@ static void sec_pmic_i2c_shutdown(struct i2c_client *i2c)
184184

185185
static const struct of_device_id sec_pmic_i2c_of_match[] = {
186186
{
187-
.compatible = "samsung,s5m8767-pmic",
188-
.data = (void *)S5M8767X,
189-
}, {
190187
.compatible = "samsung,s2dos05",
191188
.data = (void *)S2DOS05,
189+
}, {
190+
.compatible = "samsung,s2mpa01-pmic",
191+
.data = (void *)S2MPA01,
192192
}, {
193193
.compatible = "samsung,s2mps11-pmic",
194194
.data = (void *)S2MPS11X,
@@ -201,15 +201,15 @@ static const struct of_device_id sec_pmic_i2c_of_match[] = {
201201
}, {
202202
.compatible = "samsung,s2mps15-pmic",
203203
.data = (void *)S2MPS15X,
204-
}, {
205-
.compatible = "samsung,s2mpa01-pmic",
206-
.data = (void *)S2MPA01,
207204
}, {
208205
.compatible = "samsung,s2mpu02-pmic",
209206
.data = (void *)S2MPU02,
210207
}, {
211208
.compatible = "samsung,s2mpu05-pmic",
212209
.data = (void *)S2MPU05,
210+
}, {
211+
.compatible = "samsung,s5m8767-pmic",
212+
.data = (void *)S5M8767X,
213213
},
214214
{ },
215215
};

0 commit comments

Comments
 (0)