Commit 00441b5e authored by Lee Jones's avatar Lee Jones Committed by Samuel Ortiz

mfd: Fix compile errors and warnings when !CONFIG_AB8500_BM

drivers/mfd/ab8500-core.c:1015:21: error: ‘ab8500_bm_data’ undeclared here

include/linux/mfd/abx500/ab8500-bm.h:445:13: warning: ‘ab8500_fg_reinit’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:448:13: warning: ‘ab8500_charger_usb_state_changed’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:451:29: warning: ‘ab8500_btemp_get’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:455:12: warning: ‘ab8500_btemp_get_batctrl_temp’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:463:12: warning: ‘ab8500_fg_inst_curr_blocking’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:442:12: warning: ‘ab8500_fg_inst_curr_done’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:447:26: warning: ‘ab8500_fg_get’ defined but not used
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent a17155bc
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/mfd/core.h> #include <linux/mfd/core.h>
#include <linux/mfd/abx500.h> #include <linux/mfd/abx500.h>
#include <linux/mfd/abx500/ab8500.h> #include <linux/mfd/abx500/ab8500.h>
#include <linux/mfd/abx500/ab8500-bm.h>
#include <linux/mfd/dbx500-prcmu.h> #include <linux/mfd/dbx500-prcmu.h>
#include <linux/regulator/ab8500.h> #include <linux/regulator/ab8500.h>
#include <linux/of.h> #include <linux/of.h>
......
...@@ -272,8 +272,6 @@ struct abx500_bm_data { ...@@ -272,8 +272,6 @@ struct abx500_bm_data {
const struct abx500_fg_parameters *fg_params; const struct abx500_fg_parameters *fg_params;
}; };
extern struct abx500_bm_data ab8500_bm_data;
enum { enum {
NTC_EXTERNAL = 0, NTC_EXTERNAL = 0,
NTC_INTERNAL, NTC_INTERNAL,
......
...@@ -422,7 +422,10 @@ struct ab8500_chargalg_platform_data { ...@@ -422,7 +422,10 @@ struct ab8500_chargalg_platform_data {
struct ab8500_btemp; struct ab8500_btemp;
struct ab8500_gpadc; struct ab8500_gpadc;
struct ab8500_fg; struct ab8500_fg;
#ifdef CONFIG_AB8500_BM #ifdef CONFIG_AB8500_BM
extern struct abx500_bm_data ab8500_bm_data;
void ab8500_fg_reinit(void); void ab8500_fg_reinit(void);
void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA);
struct ab8500_btemp *ab8500_btemp_get(void); struct ab8500_btemp *ab8500_btemp_get(void);
...@@ -434,31 +437,7 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res); ...@@ -434,31 +437,7 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res);
int ab8500_fg_inst_curr_done(struct ab8500_fg *di); int ab8500_fg_inst_curr_done(struct ab8500_fg *di);
#else #else
int ab8500_fg_inst_curr_done(struct ab8500_fg *di) static struct abx500_bm_data ab8500_bm_data;
{
}
static void ab8500_fg_reinit(void)
{
}
static void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA)
{
}
static struct ab8500_btemp *ab8500_btemp_get(void)
{
return NULL;
}
static int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp)
{
return 0;
}
struct ab8500_fg *ab8500_fg_get(void)
{
return NULL;
}
static int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev)
{
return -ENODEV;
}
static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di) static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment