From patchwork Sat Mar 5 15:29:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 612351 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 p25FTdQ3023890 for ; Sat, 5 Mar 2011 15:30:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752876Ab1CEPaa (ORCPT ); Sat, 5 Mar 2011 10:30:30 -0500 Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]:46596 "EHLO na3sys009aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752616Ab1CEPaa (ORCPT ); Sat, 5 Mar 2011 10:30:30 -0500 Received: from source ([209.85.160.171]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKTXJXFd9hrz4FLhQLk+E/IYR+IU0qjlYP@postini.com; Sat, 05 Mar 2011 07:30:30 PST Received: by gyd12 with SMTP id 12so1451551gyd.16 for ; Sat, 05 Mar 2011 07:30:28 -0800 (PST) Received: by 10.150.52.11 with SMTP id z11mr2115394ybz.350.1299339028755; Sat, 05 Mar 2011 07:30:28 -0800 (PST) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id q13sm351065yba.8.2011.03.05.07.30.19 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Mar 2011 07:30:26 -0800 (PST) From: Nishanth Menon To: linux-omap Cc: linux-arm , Kevin Hilman , Tony , Paul , Nishanth Menon Subject: [PATCH V3 05/19] OMAP3+: voltage: use IS_ERR_OR_NULL Date: Sat, 5 Mar 2011 20:59:08 +0530 Message-Id: <1299338962-5602-6-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1299338962-5602-1-git-send-email-nm@ti.com> References: <1299338962-5602-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, 05 Mar 2011 15:30:31 +0000 (UTC) Reviewed-by: Felipe Balbi diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index 53c399f..76bcaee 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -682,7 +682,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; } @@ -703,7 +703,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; } @@ -738,7 +738,7 @@ void omap_vp_enable(struct voltagedomain *voltdm) struct omap_vdd_info *vdd; u32 vpconfig; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return; } @@ -776,7 +776,7 @@ void omap_vp_disable(struct voltagedomain *voltdm) u32 vpconfig; int timeout; - if (!voltdm || IS_ERR(voltdm)) { + if (IS_ERR_OR_NULL(voltdm)) { pr_warning("%s: VDD specified does not exist!\n", __func__); return; } @@ -829,7 +829,7 @@ int omap_voltage_scale_vdd(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; } @@ -858,7 +858,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; } @@ -890,7 +890,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; } @@ -921,7 +921,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); } @@ -959,7 +959,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; } @@ -986,7 +986,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; } @@ -1011,7 +1011,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; }