Skip to content

Commit 6891e88

Browse files
shramamoorthylag-linaro
authored andcommitted
mfd: tps65219: Use MFD_CELL macros
Use MFD_CELL macro helpers instead of plain struct properties, which makes the code shorter with the common defined MFD cell attributes. Signed-off-by: Shree Ramamoorthy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 2592303 commit 6891e88

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

drivers/mfd/tps65219.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,12 @@ static const struct resource tps65219_regulator_resources[] = {
110110
};
111111

112112
static const struct mfd_cell tps65219_cells[] = {
113-
{
114-
.name = "tps65219-regulator",
115-
.resources = tps65219_regulator_resources,
116-
.num_resources = ARRAY_SIZE(tps65219_regulator_resources),
117-
},
118-
{ .name = "tps65219-gpio", },
113+
MFD_CELL_RES("tps65219-regulator", tps65219_regulator_resources),
114+
MFD_CELL_NAME("tps65219-gpio"),
119115
};
120116

121-
static const struct mfd_cell tps65219_pwrbutton_cell = {
122-
.name = "tps65219-pwrbutton",
123-
.resources = tps65219_pwrbutton_resources,
124-
.num_resources = ARRAY_SIZE(tps65219_pwrbutton_resources),
125-
};
117+
static const struct mfd_cell tps65219_pwrbutton_cell =
118+
MFD_CELL_RES("tps65219-pwrbutton", tps65219_pwrbutton_resources);
126119

127120
static const struct regmap_config tps65219_regmap_config = {
128121
.reg_bits = 8,

0 commit comments

Comments
 (0)