From patchwork Mon May 25 14:53:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 6475571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9BCDBC0020 for ; Mon, 25 May 2015 15:14:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD64A20439 for ; Mon, 25 May 2015 15:14:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2AED5203EC for ; Mon, 25 May 2015 15:14:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ywu2N-00081X-Ve; Mon, 25 May 2015 15:11:31 +0000 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YwtqB-0004dz-Bx for linux-arm-kernel@lists.infradead.org; Mon, 25 May 2015 14:58:59 +0000 Received: by wicmc15 with SMTP id mc15so42517899wic.1 for ; Mon, 25 May 2015 07:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=WaIq7KyOvZ1tCBKnc8luM5oH3D6TUJcIm8UDodww1D0=; b=xQOCUnTtRnXyoBzUQwV4JDbaZhT8keB9SohgMxvzb5HDotByRqLeyXGfV0E+G3iv5o 7YJJNmNoSKtGrrR2e4qr9N3psAU/4qu2GVTsXiYpVy2QDa/xjjLcRpOqKWw1ppZtMfMf SpPsV3noy4h+tvn8Yyy7iK3fmXC5IFG26837u5/F3LzkDBHiXyE3goat+G85BT1jYAf1 s5s3tGjMVpEkcL8jF6oLhbmHxcwotfVzJrssUw45P0lV76Aeq0mwfroZdRqslOOxIDbM Mor/8eI2I11bQ7AwjPeL929IhqdVwYtV0kPTjuMsmmagLPOTo6N2d3W+xKocCDOTX/BJ Id7Q== X-Received: by 10.180.90.236 with SMTP id bz12mr31770254wib.33.1432565913781; Mon, 25 May 2015 07:58:33 -0700 (PDT) Received: from cizrna.lan ([109.72.12.80]) by mx.google.com with ESMTPSA id ez19sm12258917wid.19.2015.05.25.07.58.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2015 07:58:32 -0700 (PDT) From: Tomeu Vizoso To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 16/21] usb: phy: Probe phy devices on demand Date: Mon, 25 May 2015 16:53:20 +0200 Message-Id: <1432565608-26036-17-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.4.1 In-Reply-To: <1432565608-26036-1-git-send-email-tomeu.vizoso@collabora.com> References: <1432565608-26036-1-git-send-email-tomeu.vizoso@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150525_075855_601046_5C2304C7 X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Mark Rutland , linux-usb@vger.kernel.org, Tomeu Vizoso , Greg Kroah-Hartman , Dmitry Torokhov , linux-kernel@vger.kernel.org, Rob Herring , =?UTF-8?q?St=C3=A9phane=20Marchesin?= , Thierry Reding , Felipe Balbi , Grant Likely , Alexander Holler X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When looking up a phy through its DT node, ensure that the corresponding device has been registered. Signed-off-by: Tomeu Vizoso Acked-by: Felipe Balbi --- drivers/usb/phy/phy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index d1cd6b5..7084f21 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -192,6 +193,8 @@ struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, goto err0; } + of_platform_device_ensure(node); + spin_lock_irqsave(&phy_lock, flags); phy = __of_usb_find_phy(node);