aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Komierowski <karl.komierowski@gmail.com>2011-03-02 15:02:33 +0100
committerHenrik Öhman <henrik.ohman@stericsson.com>2011-03-15 14:21:16 +0100
commit8192a4f2284b03b91115bfa1e5de54d36b2cc736 (patch)
tree8246bb296ac913241e196bd5d0fb44c22ead958d
parente4b6208f4bff450e09287b1980480c5de50e7b2f (diff)
power: ab8500_bm: Adding const to battery related struct
Write protecting some of the structs used by the AB8500 battery manager. Change-Id: I248caab3204eb914eda6bd1c3a85a46f4157bea7 Signed-off-by: Kalle Komierowski <karl.komierowski@gmail.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/17447 Reviewed-by: QATOOLS Reviewed-by: Johan PALSSON <johan.palsson@stericsson.com> Tested-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com> Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-mop500-bm.c4
-rw-r--r--include/linux/mfd/ab8500/ab8500-bm.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-bm.c b/arch/arm/mach-ux500/board-mop500-bm.c
index 5225ab1d202..886a43f64a6 100644
--- a/arch/arm/mach-ux500/board-mop500-bm.c
+++ b/arch/arm/mach-ux500/board-mop500-bm.c
@@ -149,7 +149,7 @@ static struct res_to_temp temp_tbl[] = {
{65, 9425},
};
-static struct battery_type bat_type[] = {
+static const struct battery_type bat_type[] = {
[BATTERY_UNKNOWN] = {
/* First element always represent the UNKNOWN battery */
.name = POWER_SUPPLY_TECHNOLOGY_UNKNOWN,
@@ -346,7 +346,7 @@ struct ab8500_chargalg_platform_data ab8500_chargalg_plat_data = {
.num_supplicants = ARRAY_SIZE(ab8500_chargalg_supplied_to),
};
-static struct ab8500_bm_capacity_levels cap_levels = {
+static const struct ab8500_bm_capacity_levels cap_levels = {
.critical = 2,
.low = 10,
.normal = 70,
diff --git a/include/linux/mfd/ab8500/ab8500-bm.h b/include/linux/mfd/ab8500/ab8500-bm.h
index 093303761fe..2a9f97fdfa0 100644
--- a/include/linux/mfd/ab8500/ab8500-bm.h
+++ b/include/linux/mfd/ab8500/ab8500-bm.h
@@ -425,9 +425,9 @@ struct ab8500_bm_data {
int interval_charging;
int interval_not_charging;
int temp_hysteresis;
- struct ab8500_maxim_parameters *maxi;
- struct ab8500_bm_capacity_levels *cap_levels;
- struct battery_type *bat_type;
+ const struct ab8500_maxim_parameters *maxi;
+ const struct ab8500_bm_capacity_levels *cap_levels;
+ const struct battery_type *bat_type;
const struct ab8500_bm_charger_parameters *chg_params;
const struct ab8500_fg_parameters *fg_params;
};