From patchwork Fri Jan 25 03:12:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 2040311 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 565653FD56 for ; Fri, 25 Jan 2013 03:14:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756816Ab3AYDNB (ORCPT ); Thu, 24 Jan 2013 22:13:01 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:35886 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755772Ab3AYDMw (ORCPT ); Thu, 24 Jan 2013 22:12:52 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r0P3CfVZ015747; Thu, 24 Jan 2013 21:12:41 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0P3CZoS012464; Fri, 25 Jan 2013 08:42:40 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Fri, 25 Jan 2013 08:42:36 +0530 Received: from a0393678lt.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0P3CVlh024815; Fri, 25 Jan 2013 08:42:35 +0530 From: Kishon Vijay Abraham I To: , , , , , , , , , , , CC: , , Subject: [PATCH v1 7/8] usb: otg: palmas-usb: pass the correct dev ptr in regulator get Date: Fri, 25 Jan 2013 08:42:30 +0530 Message-ID: <1359083551-8524-8-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359083551-8524-1-git-send-email-kishon@ti.com> References: <1359083551-8524-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org regulator_get is passing the device pointer of the parent (palmas) instead of the child (palmas-usb). It's been fixed here. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/otg/palmas-usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/otg/palmas-usb.c b/drivers/usb/otg/palmas-usb.c index 442f09c..07629cd 100644 --- a/drivers/usb/otg/palmas-usb.c +++ b/drivers/usb/otg/palmas-usb.c @@ -303,8 +303,7 @@ static int palmas_usb_probe(struct platform_device *pdev) spin_lock_init(&palmas_usb->lock); if (!pdata->no_control_vbus) { - palmas_usb->vbus_reg = devm_regulator_get(palmas->dev, - "vbus"); + palmas_usb->vbus_reg = devm_regulator_get(&pdev->dev, "vbus"); if (IS_ERR(palmas_usb->vbus_reg)) { dev_err(&pdev->dev, "vbus init failed\n"); return PTR_ERR(palmas_usb->vbus_reg);