diff options
| author | Lee Jones <lee.jones@linaro.org> | 2013-01-09 05:06:03 -0500 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-22 11:28:44 -0500 |
| commit | 00441b5e6b98ad6a50b5cb7f88d473e3ea1e0d75 (patch) | |
| tree | 1e1785a0981a62f4e579a0a6d1f420318947012d | |
| parent | a17155bc9c9a43f94f4f502ad9776bf082219d84 (diff) | |
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: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| -rw-r--r-- | drivers/mfd/ab8500-core.c | 1 | ||||
| -rw-r--r-- | include/linux/mfd/abx500.h | 2 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500-bm.h | 29 |
3 files changed, 5 insertions, 27 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index e1650badd106..4778bb124efe 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/mfd/core.h> | 19 | #include <linux/mfd/core.h> |
| 20 | #include <linux/mfd/abx500.h> | 20 | #include <linux/mfd/abx500.h> |
| 21 | #include <linux/mfd/abx500/ab8500.h> | 21 | #include <linux/mfd/abx500/ab8500.h> |
| 22 | #include <linux/mfd/abx500/ab8500-bm.h> | ||
| 22 | #include <linux/mfd/dbx500-prcmu.h> | 23 | #include <linux/mfd/dbx500-prcmu.h> |
| 23 | #include <linux/regulator/ab8500.h> | 24 | #include <linux/regulator/ab8500.h> |
| 24 | #include <linux/of.h> | 25 | #include <linux/of.h> |
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 2138bd33021a..e53dcfeaee69 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
| @@ -272,8 +272,6 @@ struct abx500_bm_data { | |||
| 272 | const struct abx500_fg_parameters *fg_params; | 272 | const struct abx500_fg_parameters *fg_params; |
| 273 | }; | 273 | }; |
| 274 | 274 | ||
| 275 | extern struct abx500_bm_data ab8500_bm_data; | ||
| 276 | |||
| 277 | enum { | 275 | enum { |
| 278 | NTC_EXTERNAL = 0, | 276 | NTC_EXTERNAL = 0, |
| 279 | NTC_INTERNAL, | 277 | NTC_INTERNAL, |
diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h index 44310c98ee6e..9bd037df97d9 100644 --- a/include/linux/mfd/abx500/ab8500-bm.h +++ b/include/linux/mfd/abx500/ab8500-bm.h | |||
| @@ -422,7 +422,10 @@ struct ab8500_chargalg_platform_data { | |||
| 422 | struct ab8500_btemp; | 422 | struct ab8500_btemp; |
| 423 | struct ab8500_gpadc; | 423 | struct ab8500_gpadc; |
| 424 | struct ab8500_fg; | 424 | struct ab8500_fg; |
| 425 | |||
| 425 | #ifdef CONFIG_AB8500_BM | 426 | #ifdef CONFIG_AB8500_BM |
| 427 | extern struct abx500_bm_data ab8500_bm_data; | ||
| 428 | |||
| 426 | void ab8500_fg_reinit(void); | 429 | void ab8500_fg_reinit(void); |
| 427 | void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); | 430 | void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); |
| 428 | struct ab8500_btemp *ab8500_btemp_get(void); | 431 | struct ab8500_btemp *ab8500_btemp_get(void); |
| @@ -434,31 +437,7 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res); | |||
| 434 | int ab8500_fg_inst_curr_done(struct ab8500_fg *di); | 437 | int ab8500_fg_inst_curr_done(struct ab8500_fg *di); |
| 435 | 438 | ||
| 436 | #else | 439 | #else |
| 437 | int ab8500_fg_inst_curr_done(struct ab8500_fg *di) | 440 | static struct abx500_bm_data ab8500_bm_data; |
| 438 | { | ||
| 439 | } | ||
| 440 | static void ab8500_fg_reinit(void) | ||
| 441 | { | ||
| 442 | } | ||
| 443 | static void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA) | ||
| 444 | { | ||
| 445 | } | ||
| 446 | static struct ab8500_btemp *ab8500_btemp_get(void) | ||
| 447 | { | ||
| 448 | return NULL; | ||
| 449 | } | ||
| 450 | static int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp) | ||
| 451 | { | ||
| 452 | return 0; | ||
| 453 | } | ||
| 454 | struct ab8500_fg *ab8500_fg_get(void) | ||
| 455 | { | ||
| 456 | return NULL; | ||
| 457 | } | ||
| 458 | static int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev) | ||
| 459 | { | ||
| 460 | return -ENODEV; | ||
| 461 | } | ||
| 462 | 441 | ||
| 463 | static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di) | 442 | static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di) |
| 464 | { | 443 | { |
