From patchwork Thu Oct 7 19:36:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Anders, David" X-Patchwork-Id: 238751 X-Patchwork-Delegate: tony@atomide.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 o97Jabpo012540 for ; Thu, 7 Oct 2010 19:38:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754750Ab0JGTgl (ORCPT ); Thu, 7 Oct 2010 15:36:41 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:38005 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754736Ab0JGTgk (ORCPT ); Thu, 7 Oct 2010 15:36:40 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o97JaWB8013858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Oct 2010 14:36:32 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o97JaVkx009328; Thu, 7 Oct 2010 14:36:31 -0500 (CDT) Received: from localhost (ccd-dev.am.dhcp.ti.com [128.247.77.58]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o97JaVf09380; Thu, 7 Oct 2010 14:36:31 -0500 (CDT) From: David Anders To: jayabharath@ti.com, linux-omap@vger.kernel.org, khilman@deeprootsystems.com, tony@atomide.com, linux-arm-kernel@lists.infradead.org, gadiyar@ti.com Cc: David Anders Subject: [PATCH 2/3] omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set Date: Thu, 7 Oct 2010 14:36:29 -0500 Message-Id: <1286480190-20632-3-git-send-email-x0132446@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286480190-20632-1-git-send-email-x0132446@ti.com> References: <1286480190-20632-1-git-send-email-x0132446@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.3 (demeter1.kernel.org [140.211.167.41]); Thu, 07 Oct 2010 19:38:09 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index dc16884..9327ad4 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -116,7 +116,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev) static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) { - struct omap_mmc_platform_data *pdata = dev->platform_data; + struct omap_mmc_platform_data *pdata; + + /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ + if (!dev) { + pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n"); + return; + } + pdata = dev->platform_data; pdata->init = omap4_twl6030_hsmmc_late_init; }