From patchwork Thu Oct 30 05:24:24 2014 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: 39805 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2A17324046 for ; Thu, 30 Oct 2014 05:26:23 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id d17sf2710932eek.3 for ; Wed, 29 Oct 2014 22:26:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=Lkq4YvEJYMlwmDle6yat9MK0rml9tgHa+oZxFgo0hXQ=; b=a4721oyDfJDTGJlvHzqAbIFqro1mv9QsTHn+mPOhAi/9gYngPMRf2y8sYlfNECRZ3m XnAe7QBcM6OfqGP2SVCd+34gviJ8BU4rNYD3E2toGNWMG4X2FGXcSwixtTAHQGJT3m/8 0UXuNDYpJTNLRBTN9HjTfzHF2Fe61Zb6UkhIK2vGIC5RMKnI+C2ja4aRCtwqL19cpZqm 2tXbIK9aym34flo0V1fc0/Rm231c7QMsHsA/9TupX7oT4IqGXyW6qz2Y7dTCBeIwaUVT qCaYXGb7dAXgsW4axCNlx7QVsLQPm1pbXxjZ24Po5g0sBh0zAfZ611ACRkh3nk1dBwKE fBMQ== X-Gm-Message-State: ALoCoQl0TdHi+De4llWj+zb747KggG1YGvuIxAXrue0lB8vwSG4goS1i+jhzTIEEI+YD53WmvRtl X-Received: by 10.194.242.36 with SMTP id wn4mr102011wjc.4.1414646782280; Wed, 29 Oct 2014 22:26:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.74 with SMTP id a10ls286317laa.82.gmail; Wed, 29 Oct 2014 22:26:21 -0700 (PDT) X-Received: by 10.112.140.135 with SMTP id rg7mr16315011lbb.24.1414646781834; Wed, 29 Oct 2014 22:26:21 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id h3si10224253laa.106.2014.10.29.22.26.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 22:26:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id hz20so1214499lab.37 for ; Wed, 29 Oct 2014 22:26:21 -0700 (PDT) X-Received: by 10.112.12.35 with SMTP id v3mr16091430lbb.80.1414646781677; Wed, 29 Oct 2014 22:26:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp777345lbz; Wed, 29 Oct 2014 22:26:20 -0700 (PDT) X-Received: by 10.70.101.234 with SMTP id fj10mr15319736pdb.22.1414646780159; Wed, 29 Oct 2014 22:26:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yc6si5780113pab.11.2014.10.29.22.26.18 for ; Wed, 29 Oct 2014 22:26:20 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752367AbaJ3FYe (ORCPT + 26 others); Thu, 30 Oct 2014 01:24:34 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:53838 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751032AbaJ3FYd (ORCPT ); Thu, 30 Oct 2014 01:24:33 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9U5OW6V023193; Thu, 30 Oct 2014 00:24:32 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9U5OV4C015117; Thu, 30 Oct 2014 00:24:32 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Thu, 30 Oct 2014 00:24:32 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9U5OTLI009537; Thu, 30 Oct 2014 00:24:30 -0500 From: Kishon Vijay Abraham I To: , CC: , Subject: [PATCH] phy: phy-core: use the np present in of_phandle_args to get the PHY Date: Thu, 30 Oct 2014 10:54:24 +0530 Message-ID: <1414646664-10178-1-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kishon@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Instead of using the node pointer of the PHY provider and then scanning its child nodes to get a reference to the PHY, directly use the node pointer present in of_phandle_args to get a reference to the PHY. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/phy-core.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index ff5eec5..25913f4 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -420,15 +420,9 @@ struct phy *of_phy_simple_xlate(struct device *dev, struct of_phandle_args class_dev_iter_init(&iter, phy_class, NULL, NULL); while ((dev = class_dev_iter_next(&iter))) { phy = to_phy(dev); - if (node != phy->dev.of_node) { - for_each_child_of_node(node, child) { - if (child == phy->dev.of_node) - goto phy_found; - } + if (args->np != phy->dev.node) continue; - } -phy_found: class_dev_iter_exit(&iter); return phy; }