From patchwork Wed Mar 2 10:55:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 602671 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p22AuK7e008407 for ; Wed, 2 Mar 2011 10:56:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757111Ab1CBK4T (ORCPT ); Wed, 2 Mar 2011 05:56:19 -0500 Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]:33170 "EHLO na3sys009aog107.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757108Ab1CBK4S (ORCPT ); Wed, 2 Mar 2011 05:56:18 -0500 Received: from source ([209.85.213.51]) (using TLSv1) by na3sys009aob107.postini.com ([74.125.148.12]) with SMTP ID DSNKTW4iUdQ2uJ0JaQODF8Dc43na/YTcflCG@postini.com; Wed, 02 Mar 2011 02:56:18 PST Received: by mail-yw0-f51.google.com with SMTP id 4so2564444ywg.24 for ; Wed, 02 Mar 2011 02:56:17 -0800 (PST) Received: by 10.236.105.240 with SMTP id k76mr13703569yhg.96.1299063377107; Wed, 02 Mar 2011 02:56:17 -0800 (PST) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id u49sm1833174yhn.37.2011.03.02.02.56.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Mar 2011 02:56:15 -0800 (PST) From: Nishanth Menon To: linux-omap Cc: Kevin H , Tony L , linux-arm , Nishanth Menon Subject: [PATCH v2 04/18] omap3+: voltage: use IS_ERR_OR_NULL Date: Wed, 2 Mar 2011 16:25:17 +0530 Message-Id: <1299063331-27968-5-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1299063331-27968-1-git-send-email-nm@ti.com> References: <1299063331-27968-1-git-send-email-nm@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 02 Mar 2011 10:56:20 +0000 (UTC) diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index 992b383..3ee8a80 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -471,7 +471,7 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd) vdd->debug_dir = debugfs_create_dir(name, voltage_dir); kfree(name); - if (IS_ERR(vdd->debug_dir)) { + if (IS_ERR_OR_NULL(vdd->debug_dir)) { pr_warning("%s: Unable to create debugfs directory for" " vdd_%s\n", __func__, vdd->voltdm.name); vdd->debug_dir = NULL; @@ -851,7 +851,7 @@ static int __init omap3_vdd_data_configure(struct omap_vdd_info *vdd) * smpswaittimemin and smpswaittimemax. */ sys_ck = clk_get(NULL, "sys_ck"); - if (IS_ERR(sys_ck)) { + if (IS_ERR_OR_NULL(sys_ck)) { pr_warning("%s: Could not get the sys clk to calculate" "various vdd_%s params\n", __func__, vdd->voltdm.name); return -EINVAL; @@ -1041,7 +1041,7 @@ static int __init omap4_vdd_data_configure(struct omap_vdd_info *vdd) * smpswaittimemin and smpswaittimemax. */ sys_ck = clk_get(NULL, "sys_clkin_ck"); - if (IS_ERR(sys_ck)) { + if (IS_ERR_OR_NULL(sys_ck)) { pr_warning("%s: Could not get the sys clk to calculate" "various vdd_%s params\n", __func__, vdd->voltdm.name); return -EINVAL; @@ -1125,7 +1125,7 @@ unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm) { struct omap_vdd_info *vdd; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return 0; } @@ -1146,7 +1146,7 @@ unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm) struct omap_vdd_info *vdd; u8 curr_vsel; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return 0; } @@ -1183,7 +1183,7 @@ void omap_vp_enable(struct voltagedomain *voltdm) u32 vpconfig; u16 mod; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return; } @@ -1224,7 +1224,7 @@ void omap_vp_disable(struct voltagedomain *voltdm) u16 mod; int timeout; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return; } @@ -1308,7 +1308,7 @@ void omap_voltage_reset(struct voltagedomain *voltdm) { unsigned long target_uvdc; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return; } @@ -1340,7 +1340,7 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm, { struct omap_vdd_info *vdd; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return; } @@ -1371,7 +1371,7 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, struct omap_vdd_info *vdd; int i; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return ERR_PTR(-EINVAL); } @@ -1409,7 +1409,7 @@ int omap_voltage_register_pmic(struct voltagedomain *voltdm, { struct omap_vdd_info *vdd; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return -EINVAL; } @@ -1436,7 +1436,7 @@ struct dentry *omap_voltage_get_dbgdir(struct voltagedomain *voltdm) { struct omap_vdd_info *vdd; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return NULL; } @@ -1461,7 +1461,7 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm, { struct omap_vdd_info *vdd; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return; } @@ -1531,7 +1531,7 @@ int __init omap_voltage_late_init(void) } voltage_dir = debugfs_create_dir("voltage", NULL); - if (IS_ERR(voltage_dir)) + if (IS_ERR_OR_NULL(voltage_dir)) pr_err("%s: Unable to create voltage debugfs main dir\n", __func__); for (i = 0; i < nr_scalable_vdd; i++) {