]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mfd: tps65219: Use MFD_CELL macros
authorShree Ramamoorthy <s-ramamoorthy@ti.com>
Tue, 17 Dec 2024 20:49:34 +0000 (14:49 -0600)
committerLee Jones <lee@kernel.org>
Thu, 9 Jan 2025 09:55:35 +0000 (09:55 +0000)
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 <s-ramamoorthy@ti.com>
Link: https://lore.kernel.org/r/20241217204935.1012106-2-s-ramamoorthy@ti.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/tps65219.c

index 57ff5cb294a66473d0189c7af94920cae5565fff..081c5a30b04a25f5379b99a97803b84d3c683aa3 100644 (file)
@@ -110,19 +110,12 @@ static const struct resource tps65219_regulator_resources[] = {
 };
 
 static const struct mfd_cell tps65219_cells[] = {
-       {
-               .name = "tps65219-regulator",
-               .resources = tps65219_regulator_resources,
-               .num_resources = ARRAY_SIZE(tps65219_regulator_resources),
-       },
-       { .name = "tps65219-gpio", },
+       MFD_CELL_RES("tps65219-regulator", tps65219_regulator_resources),
+       MFD_CELL_NAME("tps65219-gpio"),
 };
 
-static const struct mfd_cell tps65219_pwrbutton_cell = {
-       .name = "tps65219-pwrbutton",
-       .resources = tps65219_pwrbutton_resources,
-       .num_resources = ARRAY_SIZE(tps65219_pwrbutton_resources),
-};
+static const struct mfd_cell tps65219_pwrbutton_cell =
+       MFD_CELL_RES("tps65219-pwrbutton", tps65219_pwrbutton_resources);
 
 static const struct regmap_config tps65219_regmap_config = {
        .reg_bits = 8,