From patchwork Tue Oct 2 16:36:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11951 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 758C923EFF for ; Tue, 2 Oct 2012 16:37:18 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0A20DA18739 for ; Tue, 2 Oct 2012 16:37:17 +0000 (UTC) Received: by ieje10 with SMTP id e10so14609064iej.11 for ; Tue, 02 Oct 2012 09:37:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=n639o/k8OFy/m2wj2CB/tusJ2yAZLc3I56S+NSS9bPE=; b=Ccs5mqI4fAeBdAXXSu3gOzllCRUpWqbuTlPv7jmxZGKP2egt9qTt9AuZHwPexncIn5 vQ2CuNr1vDkcRxJHVce3cCEfickj3q5hryI17uxoeVd2PN2UPNnHntAoyskBAkN9pMuM KMMXaKgbn8VUXEhObqrhKfFLdpOfv57Kx+J7LW5zsnpPkstTM06kR8rGqDcM9Xw+pFV5 P81/ZIOtrV4HTXcSK7ImVLecyQbpgSzaO/1K2lcGvxXrs8ou1PnPE5ei8dWkbDnqDgYn q9t+LYmcvL+3iRWhoQ9SG5aV7ximX4q2XuBxLCL7UWfbWAM6H/1AQuoNbItwivSmYASi 9L+w== Received: by 10.50.160.165 with SMTP id xl5mr9542784igb.0.1349195837406; Tue, 02 Oct 2012 09:37:17 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp92044igc; Tue, 2 Oct 2012 09:37:16 -0700 (PDT) Received: by 10.216.141.16 with SMTP id f16mr10947084wej.130.1349195835737; Tue, 02 Oct 2012 09:37:15 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.187]) by mx.google.com with ESMTPS id z8si1733317wep.35.2012.10.02.09.37.15 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 09:37:15 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.187; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.187 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0Lzpcx-1TVgl22N6p-014fd6; Tue, 02 Oct 2012 18:37:12 +0200 From: Arnd Bergmann To: linux-arm-kernel@infradead.org Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Pavel Machek , Stanislav Brabec , Eric Miao , Haojian Zhuang Subject: [PATCH 05/17] ARM: pxa: remove sharpsl_fatal_check function Date: Tue, 2 Oct 2012 18:36:44 +0200 Message-Id: <1349195816-2225-6-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349195816-2225-1-git-send-email-arnd@arndb.de> References: <1349195816-2225-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:BROzabsOdDRw7rJaQcxXsTdmdlCpJB40KrQKZm4FAfk JrIz7RvfhM4kOCmp3/XpcdXdTGPu1O+yJW4GEmgI7zQ0Lw9vxe kgKp+rRCS+8NNo5dLdncPpeVsqrnk56s4XehFDgfnzzaTYHlvM VoFyI5i6+grhVfsab5bFHlG2BcyUE5hZg6KN62iKIV53kr3iYk q8uwq988p4HMdMBXQ0XEwQLLa4E4wWnRLpT2L2kJJsDIa3fNmp 7QiHOictbZNtwM4g6GoK7RbYWycFRIa9W3pnlFhbFys8M0qOr3 3e+RbtNgC3jt2dgYEcg6x31KGKx/FVB3wW+WnW5bsdpX7/cUEv TxsdX7SmOAA4zztBJGqm4GA5barpVYIkelheZMKv/dFnqcdMtM ZIdgTnb3bpw4g== X-Gm-Message-State: ALoCoQmn+ygVjZSsYJcUcwJ6lDiih5KBRQM0/yrU5JMK/6n6OwX1AhHfvB06hqmRuJWY4Tc/egeT 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 Cc: Pavel Machek Cc: Stanislav Brabec Cc: Eric Miao Cc: Haojian Zhuang --- arch/arm/mach-pxa/sharpsl_pm.c | 48 ---------------------------------------- 1 file changed, 48 deletions(-) diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index bdf4cb8..6c9658f 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -55,7 +55,6 @@ #ifdef CONFIG_PM static int sharpsl_off_charge_battery(void); static int sharpsl_check_battery_voltage(void); -static int sharpsl_fatal_check(void); #endif static int sharpsl_check_battery_temp(void); static int sharpsl_ac_check(void); @@ -686,53 +685,6 @@ static int corgi_pxa_pm_enter(suspend_state_t state) return 0; } -/* - * Check for fatal battery errors - * Fatal returns -1 - */ -static int sharpsl_fatal_check(void) -{ - int buff[5], temp, i, acin; - - dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check entered\n"); - - /* Check AC-Adapter */ - acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN); - - if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) { - sharpsl_pm.machinfo->charge(0); - udelay(100); - sharpsl_pm.machinfo->discharge(1); /* enable discharge */ - mdelay(SHARPSL_WAIT_DISCHARGE_ON); - } - - if (sharpsl_pm.machinfo->discharge1) - sharpsl_pm.machinfo->discharge1(1); - - /* Check battery : check inserting battery ? */ - for (i = 0; i < 5; i++) { - buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); - mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT); - } - - if (sharpsl_pm.machinfo->discharge1) - sharpsl_pm.machinfo->discharge1(0); - - if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) { - udelay(100); - sharpsl_pm.machinfo->charge(1); - sharpsl_pm.machinfo->discharge(0); - } - - temp = get_select_val(buff); - 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)); - - if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) || - (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt))) - return -1; - return 0; -} - static int sharpsl_off_charge_error(void) { dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n");