From patchwork Sun Oct 14 20:32:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 191399 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 74E392C008A for ; Mon, 15 Oct 2012 07:32:29 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TNUrL-0006Ak-RW; Sun, 14 Oct 2012 20:32:27 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TNUrI-00068x-51 for fwts-devel@lists.ubuntu.com; Sun, 14 Oct 2012 20:32:24 +0000 Received: from cpc3-craw6-2-0-cust180.croy.cable.virginmedia.com ([77.100.248.181] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TNUrI-0003rL-20 for fwts-devel@lists.ubuntu.com; Sun, 14 Oct 2012 20:32:24 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 09/26] lib: fwts_battery: remove redundant framework parameter in helper functions Date: Sun, 14 Oct 2012 21:32:01 +0100 Message-Id: <1350246738-31699-10-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350246738-31699-1-git-send-email-colin.king@canonical.com> References: <1350246738-31699-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King We don't require the fwts_framework parameter in the following functions: fwts_battery_get_count_sys_fs fwts_battery_get_count_proc_fs fwts_battery_get_name_sys_fs fwts_battery_get_name_proc_fs ..so remove it. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Keng-Yu Lin --- src/lib/src/fwts_battery.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/src/fwts_battery.c b/src/lib/src/fwts_battery.c index 656cc33..b792d0b 100644 --- a/src/lib/src/fwts_battery.c +++ b/src/lib/src/fwts_battery.c @@ -176,7 +176,7 @@ static int fwts_battery_get_capacity_proc_fs(fwts_framework *fw, return FWTS_OK; } -static int fwts_battery_get_count_sys_fs(fwts_framework *fw, DIR *dir, int *count) +static int fwts_battery_get_count_sys_fs(DIR *dir, int *count) { struct dirent *entry; char path[PATH_MAX]; @@ -197,7 +197,7 @@ static int fwts_battery_get_count_sys_fs(fwts_framework *fw, DIR *dir, int *coun return FWTS_OK; } -static int fwts_battery_get_count_proc_fs(fwts_framework *fw, DIR *dir, int *count) +static int fwts_battery_get_count_proc_fs(DIR *dir, int *count) { struct dirent *entry; do { @@ -208,7 +208,7 @@ static int fwts_battery_get_count_proc_fs(fwts_framework *fw, DIR *dir, int *cou return FWTS_OK; } -static int fwts_battery_get_name_sys_fs(fwts_framework *fw, DIR *dir, int index, char *name) +static int fwts_battery_get_name_sys_fs(DIR *dir, int index, char *name) { struct dirent *entry; char path[PATH_MAX]; @@ -242,7 +242,7 @@ static int fwts_battery_get_name_sys_fs(fwts_framework *fw, DIR *dir, int index, return FWTS_ERROR; } -static int fwts_battery_get_name_proc_fs(fwts_framework *fw, DIR *dir, int index, char *name) +static int fwts_battery_get_name_proc_fs(DIR *dir, int index, char *name) { struct dirent *entry; int i = 0; @@ -591,10 +591,10 @@ int fwts_battery_get_name(fwts_framework *fw, int index, char *name) DIR *dir; if ((dir = opendir(FWTS_SYS_CLASS_POWER_SUPPLY)) != NULL) { - ret = fwts_battery_get_name_sys_fs(fw, dir, index, name); + ret = fwts_battery_get_name_sys_fs(dir, index, name); closedir(dir); } else if ((dir = opendir(FWTS_PROC_ACPI_BATTERY)) != NULL) { - ret = fwts_battery_get_name_proc_fs(fw, dir, index, name); + ret = fwts_battery_get_name_proc_fs(dir, index, name); closedir(dir); } else { return FWTS_ERROR; @@ -609,10 +609,10 @@ int fwts_battery_get_count(fwts_framework *fw, int *count) DIR *dir; if ((dir = opendir(FWTS_SYS_CLASS_POWER_SUPPLY)) != NULL) { - ret = fwts_battery_get_count_sys_fs(fw, dir, count); + ret = fwts_battery_get_count_sys_fs(dir, count); closedir(dir); } else if ((dir = opendir(FWTS_PROC_ACPI_BATTERY)) != NULL) { - ret = fwts_battery_get_count_proc_fs(fw, dir, count); + ret = fwts_battery_get_count_proc_fs(dir, count); closedir(dir); } else { return FWTS_ERROR;