diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-04-30 09:53:06 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-10-04 04:20:22 -0400 |
commit | 066258f4293128bb489e42790637dd6d9b7ff206 (patch) | |
tree | 58e22ab12cac208aa86a84329691d3f4f5f66455 /arch/arm/mach-pxa | |
parent | 30bda0ebef512af996a079977488ea52a0ff1646 (diff) |
ARM: pxa: remove sharpsl_fatal_check function
The sharpsl_fatal_check has not been used since Pavel Machek removed
the caller in 99f329a2b "pxa/sharpsl_pm: zaurus c3000 aka spitz: fix
resume". Nobody has complained since 2009, so it's safe to assume we
can just remove the function.
Without this patch, building corgi_defconfig results in:
/home/arnd/linux-arm/arch/arm/mach-pxa/sharpsl_pm.c:693:12: warning: 'sharpsl_fatal_check' defined but not used [-Wunused-function]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Stanislav Brabec <utx@penguin.cz>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/sharpsl_pm.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index bdf4cb88ca0a..6c9658f4695a 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c | |||
@@ -55,7 +55,6 @@ | |||
55 | #ifdef CONFIG_PM | 55 | #ifdef CONFIG_PM |
56 | static int sharpsl_off_charge_battery(void); | 56 | static int sharpsl_off_charge_battery(void); |
57 | static int sharpsl_check_battery_voltage(void); | 57 | static int sharpsl_check_battery_voltage(void); |
58 | static int sharpsl_fatal_check(void); | ||
59 | #endif | 58 | #endif |
60 | static int sharpsl_check_battery_temp(void); | 59 | static int sharpsl_check_battery_temp(void); |
61 | static int sharpsl_ac_check(void); | 60 | static int sharpsl_ac_check(void); |
@@ -686,53 +685,6 @@ static int corgi_pxa_pm_enter(suspend_state_t state) | |||
686 | return 0; | 685 | return 0; |
687 | } | 686 | } |
688 | 687 | ||
689 | /* | ||
690 | * Check for fatal battery errors | ||
691 | * Fatal returns -1 | ||
692 | */ | ||
693 | static int sharpsl_fatal_check(void) | ||
694 | { | ||
695 | int buff[5], temp, i, acin; | ||
696 | |||
697 | dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check entered\n"); | ||
698 | |||
699 | /* Check AC-Adapter */ | ||
700 | acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN); | ||
701 | |||
702 | if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) { | ||
703 | sharpsl_pm.machinfo->charge(0); | ||
704 | udelay(100); | ||
705 | sharpsl_pm.machinfo->discharge(1); /* enable discharge */ | ||
706 | mdelay(SHARPSL_WAIT_DISCHARGE_ON); | ||
707 | } | ||
708 | |||
709 | if (sharpsl_pm.machinfo->discharge1) | ||
710 | sharpsl_pm.machinfo->discharge1(1); | ||
711 | |||
712 | /* Check battery : check inserting battery ? */ | ||
713 | for (i = 0; i < 5; i++) { | ||
714 | buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); | ||
715 | mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT); | ||
716 | } | ||
717 | |||
718 | if (sharpsl_pm.machinfo->discharge1) | ||
719 | sharpsl_pm.machinfo->discharge1(0); | ||
720 | |||
721 | if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) { | ||
722 | udelay(100); | ||
723 | sharpsl_pm.machinfo->charge(1); | ||
724 | sharpsl_pm.machinfo->discharge(0); | ||
725 | } | ||
726 | |||
727 | temp = get_select_val(buff); | ||
728 | dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %ld\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT)); | ||
729 | |||
730 | if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) || | ||
731 | (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt))) | ||
732 | return -1; | ||
733 | return 0; | ||
734 | } | ||
735 | |||
736 | static int sharpsl_off_charge_error(void) | 688 | static int sharpsl_off_charge_error(void) |
737 | { | 689 | { |
738 | dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n"); | 690 | dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n"); |