From patchwork Thu Aug 11 03:27:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Manna X-Patchwork-Id: 1055672 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7B3S63r014113 for ; Thu, 11 Aug 2011 03:28:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754070Ab1HKD2B (ORCPT ); Wed, 10 Aug 2011 23:28:01 -0400 Received: from hapkido.dreamhost.com ([66.33.216.122]:44944 "EHLO hapkido.dreamhost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753930Ab1HKD17 (ORCPT ); Wed, 10 Aug 2011 23:27:59 -0400 Received: from homiemail-a66.g.dreamhost.com (caiajhbdcbbj.dreamhost.com [208.97.132.119]) by hapkido.dreamhost.com (Postfix) with ESMTP id E136217E55A for ; Wed, 10 Aug 2011 20:27:58 -0700 (PDT) Received: from homiemail-a66.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a66.g.dreamhost.com (Postfix) with ESMTP id 722C9350072; Wed, 10 Aug 2011 20:27:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=kylemanna.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; q=dns; s= kylemanna.com; b=V/Vl4zpYBzBbXFoR+9do4Dr1v6qIQGx4U180oPiIUEviJji DIT3LnHDdCG9RZFjmu4NLYhUBu7A2DElq5YIJ+hk624yLw7iUSUXt5z3OqQ+2y1q 5lvIx3ugizGZjhvemwRDxOpJ2LjZqT/Ywen+TQHeRBHORBLUUGqlQmbrHRrc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=kylemanna.com; h=from:to :cc:subject:date:message-id:in-reply-to:references; s= kylemanna.com; bh=mrUC+Fr1KyIcKsc47HSzwr1LtvM=; b=LfPcvzDfDb+XW4 kAHpU47U5yQc2EAzZLnMpXZ5U8Z2+i4v41mknEF0EK+oWeknD5PO7HtPnlp//ufy Pq44PX6mTvmHI5Q98SZflWV4LXo6M4ZSq1S3bw2YBEowClsXl3mVIsKLWRI9dGB3 YEIZe7LnWA0pP+2u2bSXXd+MRlfDs= Received: from core (cpe-70-116-138-43.tx.res.rr.com [70.116.138.43]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: core@frozenliquid.net) by homiemail-a66.g.dreamhost.com (Postfix) with ESMTPSA id 5C75435005B; Wed, 10 Aug 2011 20:27:57 -0700 (PDT) Received: by core (Postfix, from userid 1000) id 6F9B96808B8; Wed, 10 Aug 2011 22:27:56 -0500 (CDT) From: Kyle Manna To: linux-omap@vger.kernel.org Cc: Kyle Manna Subject: [PATCH 1/3] twl4030-madc: copy the device pointer Date: Wed, 10 Aug 2011 22:27:50 -0500 Message-Id: <1313033272-16774-2-git-send-email-kyle@kylemanna.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313033272-16774-1-git-send-email-kyle@kylemanna.com> References: <1313033272-16774-1-git-send-email-kyle@kylemanna.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]); Thu, 11 Aug 2011 03:28:37 +0000 (UTC) Worst case this fixes the following error: [ 72.086212] (NULL device *): conversion timeout! Best case it prevents a crash Signed-off-by: Kyle Manna --- drivers/mfd/twl4030-madc.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c index b5d598c..8ef7801 100644 --- a/drivers/mfd/twl4030-madc.c +++ b/drivers/mfd/twl4030-madc.c @@ -706,6 +706,9 @@ static int __devinit twl4030_madc_probe(struct platform_device *pdev) if (!madc) return -ENOMEM; + /* Copy the pointer to device struct */ + madc->dev = &pdev->dev; + /* * Phoenix provides 2 interrupt lines. The first one is connected to * the OMAP. The other one can be connected to the other processor such @@ -733,7 +736,7 @@ static int __devinit twl4030_madc_probe(struct platform_device *pdev) ret = twl_i2c_write_u8(TWL4030_MODULE_MAIN_CHARGE, regval, TWL4030_BCI_BCICTL1); if (ret) { - dev_err(&pdev->dev, "unable to write reg BCI Ctl1 0x%X\n", + dev_err(&pdev->dev, "unable to write reg BCI CTL1 0x%X\n", TWL4030_BCI_BCICTL1); goto err_i2c; }