From patchwork Sun Dec 6 11:18:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 65140 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB6BIriT011791 for ; Sun, 6 Dec 2009 11:18:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933672AbZLFLSp (ORCPT ); Sun, 6 Dec 2009 06:18:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933671AbZLFLSp (ORCPT ); Sun, 6 Dec 2009 06:18:45 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:39526 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933664AbZLFLSp (ORCPT ); Sun, 6 Dec 2009 06:18:45 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id nB6BIlSI015707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Dec 2009 05:18:50 -0600 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id nB6BIiQi009499; Sun, 6 Dec 2009 16:48:45 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id nB6BIiUk026234; Sun, 6 Dec 2009 16:48:44 +0530 Received: (from a0393109@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id nB6BIhNl026231; Sun, 6 Dec 2009 16:48:43 +0530 From: Thara Gopinath To: linux-omap@vger.kernel.org Cc: Thara Gopinath , Paul Walmsley Subject: [PATCH] OMAP3: hwmod: check for clkdomain pointer before accesing it to change the sleep dependencies. Date: Sun, 6 Dec 2009 16:48:43 +0530 Message-Id: <1260098323-26183-1-git-send-email-thara@ti.com> X-Mailer: git-send-email 1.5.5 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 18e6478..3edc387 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -314,8 +314,10 @@ static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) if (!oh->_clk) return -EINVAL; - return pwrdm_add_sleepdep(oh->_clk->clkdm->pwrdm.ptr, + if (oh->_clk->clkdm) + return pwrdm_add_sleepdep(oh->_clk->clkdm->pwrdm.ptr, init_oh->_clk->clkdm->pwrdm.ptr); + return 0; } /** @@ -335,8 +337,10 @@ static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) if (!oh->_clk) return -EINVAL; - return pwrdm_del_sleepdep(oh->_clk->clkdm->pwrdm.ptr, + if (oh->_clk->clkdm) + return pwrdm_del_sleepdep(oh->_clk->clkdm->pwrdm.ptr, init_oh->_clk->clkdm->pwrdm.ptr); + return 0; } /**