From patchwork Sat Feb 19 12:01:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 574721 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 p1JC2Bh8013921 for ; Sat, 19 Feb 2011 12:02:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751648Ab1BSMCs (ORCPT ); Sat, 19 Feb 2011 07:02:48 -0500 Received: from na3sys009aog117.obsmtp.com ([74.125.149.242]:43201 "EHLO na3sys009aog117.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267Ab1BSMCr (ORCPT ); Sat, 19 Feb 2011 07:02:47 -0500 Received: from source ([209.85.218.50]) (using TLSv1) by na3sys009aob117.postini.com ([74.125.148.12]) with SMTP ID DSNKTV+xZxFBd1m25QCgI+xIazufPXl3UNmD@postini.com; Sat, 19 Feb 2011 04:02:47 PST Received: by mail-yi0-f50.google.com with SMTP id 30so487606yie.23 for ; Sat, 19 Feb 2011 04:02:46 -0800 (PST) Received: by 10.236.110.14 with SMTP id t14mr3388152yhg.57.1298116966898; Sat, 19 Feb 2011 04:02:46 -0800 (PST) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id i60sm1992553yhj.17.2011.02.19.04.02.43 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 19 Feb 2011 04:02:46 -0800 (PST) From: Nishanth Menon To: linux-omap Cc: Tony Lindgren , Kevin Hilman , Nishanth Menon Subject: [PATCH 05/19] omap3+: voltage: use IS_ERR_OR_NULL Date: Sat, 19 Feb 2011 17:31:44 +0530 Message-Id: <1298116918-30744-6-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1298116918-30744-1-git-send-email-nm@ti.com> References: <1298116918-30744-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]); Sat, 19 Feb 2011 12:02:49 +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++) {