From 49b435908b2aeb0f3a8a5256256019594a5adc1c Mon Sep 17 00:00:00 2001 From: Jakob Hauser Date: Mon, 15 May 2023 22:57:16 +0200 Subject: [PATCH] power: supply: rt5033_battery: Move struct rt5033_battery to battery driver Move struct rt5033_battery from the mfd header into the battery driver because it's not used by others. Within struct rt5033_battery, remove the line "struct rt5033_dev *rt5033;" because it doesn't get used. In rt5033.h, remove #include , it's not necessary anymore. In rt5033_battery.c, remove #include , it's not necessary anymore either. Instead add #include and Signed-off-by: Jakob Hauser Acked-by: Sebastian Reichel Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/736e1cbee257853cb3d1da6f05c184e9a053263b.1684182964.git.jahau@rocketmail.com --- drivers/power/supply/rt5033_battery.c | 9 ++++++++- include/linux/mfd/rt5033.h | 8 -------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply/rt5033_battery.c index 5c04cf3..91e1efd 100644 --- a/drivers/power/supply/rt5033_battery.c +++ b/drivers/power/supply/rt5033_battery.c @@ -6,11 +6,18 @@ * Author: Beomho Seo */ +#include #include #include #include +#include #include -#include + +struct rt5033_battery { + struct i2c_client *client; + struct regmap *regmap; + struct power_supply *psy; +}; static int rt5033_battery_get_capacity(struct i2c_client *client) { diff --git a/include/linux/mfd/rt5033.h b/include/linux/mfd/rt5033.h index 3992fb2..bb3d189 100644 --- a/include/linux/mfd/rt5033.h +++ b/include/linux/mfd/rt5033.h @@ -12,7 +12,6 @@ #include #include #include -#include /* RT5033 regulator IDs */ enum rt5033_regulators { @@ -32,11 +31,4 @@ struct rt5033_dev { bool wakeup; }; -struct rt5033_battery { - struct i2c_client *client; - struct rt5033_dev *rt5033; - struct regmap *regmap; - struct power_supply *psy; -}; - #endif /* __RT5033_H__ */ -- 2.7.4