Skip to content

Commit 55684cb

Browse files
andredlag-linaro
authored andcommitted
mfd: sec-common: Convert to using MFD_CELL macros
Use MFD_CELL macro helpers instead of open coding. This makes the code a bit shorter and more obvious. Signed-off-by: André Draszik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 2b897a1 commit 55684cb

File tree

1 file changed

+21
-36
lines changed

1 file changed

+21
-36
lines changed

drivers/mfd/sec-common.c

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@
2424
#include "sec-core.h"
2525

2626
static const struct mfd_cell s5m8767_devs[] = {
27-
{ .name = "s5m8767-pmic", },
28-
{ .name = "s5m-rtc", },
29-
{
30-
.name = "s5m8767-clk",
31-
.of_compatible = "samsung,s5m8767-clk",
32-
},
27+
MFD_CELL_NAME("s5m8767-pmic"),
28+
MFD_CELL_NAME("s5m-rtc"),
29+
MFD_CELL_OF("s5m8767-clk", NULL, NULL, 0, 0, "samsung,s5m8767-clk"),
3330
};
3431

3532
static const struct mfd_cell s2dos05_devs[] = {
36-
{ .name = "s2dos05-regulator", },
33+
MFD_CELL_NAME("s2dos05-regulator"),
3734
};
3835

3936
static const struct mfd_cell s2mpg10_devs[] = {
@@ -45,53 +42,41 @@ static const struct mfd_cell s2mpg10_devs[] = {
4542
};
4643

4744
static const struct mfd_cell s2mps11_devs[] = {
48-
{ .name = "s2mps11-regulator", },
49-
{ .name = "s2mps14-rtc", },
50-
{
51-
.name = "s2mps11-clk",
52-
.of_compatible = "samsung,s2mps11-clk",
53-
},
45+
MFD_CELL_NAME("s2mps11-regulator"),
46+
MFD_CELL_NAME("s2mps14-rtc"),
47+
MFD_CELL_OF("s2mps11-clk", NULL, NULL, 0, 0, "samsung,s2mps11-clk"),
5448
};
5549

5650
static const struct mfd_cell s2mps13_devs[] = {
57-
{ .name = "s2mps13-regulator", },
58-
{ .name = "s2mps13-rtc", },
59-
{
60-
.name = "s2mps13-clk",
61-
.of_compatible = "samsung,s2mps13-clk",
62-
},
51+
MFD_CELL_NAME("s2mps13-regulator"),
52+
MFD_CELL_NAME("s2mps13-rtc"),
53+
MFD_CELL_OF("s2mps13-clk", NULL, NULL, 0, 0, "samsung,s2mps13-clk"),
6354
};
6455

6556
static const struct mfd_cell s2mps14_devs[] = {
66-
{ .name = "s2mps14-regulator", },
67-
{ .name = "s2mps14-rtc", },
68-
{
69-
.name = "s2mps14-clk",
70-
.of_compatible = "samsung,s2mps14-clk",
71-
},
57+
MFD_CELL_NAME("s2mps14-regulator"),
58+
MFD_CELL_NAME("s2mps14-rtc"),
59+
MFD_CELL_OF("s2mps14-clk", NULL, NULL, 0, 0, "samsung,s2mps14-clk"),
7260
};
7361

7462
static const struct mfd_cell s2mps15_devs[] = {
75-
{ .name = "s2mps15-regulator", },
76-
{ .name = "s2mps15-rtc", },
77-
{
78-
.name = "s2mps13-clk",
79-
.of_compatible = "samsung,s2mps13-clk",
80-
},
63+
MFD_CELL_NAME("s2mps15-regulator"),
64+
MFD_CELL_NAME("s2mps15-rtc"),
65+
MFD_CELL_OF("s2mps13-clk", NULL, NULL, 0, 0, "samsung,s2mps13-clk"),
8166
};
8267

8368
static const struct mfd_cell s2mpa01_devs[] = {
84-
{ .name = "s2mpa01-pmic", },
85-
{ .name = "s2mps14-rtc", },
69+
MFD_CELL_NAME("s2mpa01-pmic"),
70+
MFD_CELL_NAME("s2mps14-rtc"),
8671
};
8772

8873
static const struct mfd_cell s2mpu02_devs[] = {
89-
{ .name = "s2mpu02-regulator", },
74+
MFD_CELL_NAME("s2mpu02-regulator"),
9075
};
9176

9277
static const struct mfd_cell s2mpu05_devs[] = {
93-
{ .name = "s2mpu05-regulator", },
94-
{ .name = "s2mps15-rtc", },
78+
MFD_CELL_NAME("s2mpu05-regulator"),
79+
MFD_CELL_NAME("s2mps15-rtc"),
9580
};
9681

9782
static void sec_pmic_dump_rev(struct sec_pmic_dev *sec_pmic)

0 commit comments

Comments
 (0)