From patchwork Tue Jun 19 16:09:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10474985 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 38160603B5 for ; Tue, 19 Jun 2018 16:16:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 298EA28AF5 for ; Tue, 19 Jun 2018 16:16:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E47928ED1; Tue, 19 Jun 2018 16:16:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C27FA28AF5 for ; Tue, 19 Jun 2018 16:16:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966263AbeFSQLJ (ORCPT ); Tue, 19 Jun 2018 12:11:09 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:37901 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966768AbeFSQKB (ORCPT ); Tue, 19 Jun 2018 12:10:01 -0400 Received: by mail-wr0-f193.google.com with SMTP id e18-v6so243009wrs.5 for ; Tue, 19 Jun 2018 09:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=V0eszlvvLll1jSCx8Hip/81hnp7ScaDxD1FHTBML81M=; b=Pup7JuNJPsFQJmBrceWSEs+VH9dBEmsCHIYo2HIu9Idvbh6YdnURDYkuFxMr7Ytwxv tAZv5dtEUoOtyTfU9ql3NxGHIvNRGDFrKyWbudD0Nw8Sw0pJdysfFVPphv8n44sEtUrJ 6a1fWvEFihfJ9NkPkPK5askHHnsxZzPpyYsK0XPnRSn1UUQ/aCWnKeW9J3QMKdJjvCFq VMXXaAu8CjKt72VPhjNkeWTG0KnI8RRuj8B9pAoJuojHiy9ivab2bkrLMeFpcqoTVfIR AuJOn95quBCl0vT09/c4U6JZ7pTVXksL+zfVrCRYmZUniK/dNqyNE9340bII+azBDwUw KMgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V0eszlvvLll1jSCx8Hip/81hnp7ScaDxD1FHTBML81M=; b=Z1CVx4bCnvuDs/Hqq+3ARs7L6BJEcanI1MgRb07nFI25FN/YRRGhkHWLlkr7MJDIp3 p2L7BML4Xd41LpvpQKK8ae14w+ixTF6VDHi7hAC8d+ShfWsNkJR6lCihaa9aurV2nRiY ogsYlEn8KDWrqLgxZr8P6lLgGCO45OjIVf4V1aFERduIvl5cn5Nq2HZM7BEZ/VKJntkr tMawsWXCl/+1cx4t23AaLY/iCneqLDfQlNaHgT8YmTVmxgSnmK4O0xQS0ENK3a1Xc/an 9PyncZDT98vL1xbE88mQdeGKoc152PL4a9jlERWUgtlwYsaIyTI2UbLl1HvgHv8oYPAE abXw== X-Gm-Message-State: APt69E3x1lk56VopjiuiBpsFXFL/aHWsxgF2QN9wGHM8rM3qAG7Wttwv V72GVyxp+S8hSsgRznPAUWJhqD1gO1A= X-Google-Smtp-Source: ADUXVKJaVTiPlCpUoa36dwe6ePAOa5b4c+uRNPD+J7LeANUR0YkLK+UR85RMFB6VUBfCqhNpOhlt6g== X-Received: by 2002:adf:9187:: with SMTP id 7-v6mr15765097wri.69.1529424600789; Tue, 19 Jun 2018 09:10:00 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-1-7080-22.w90-116.abo.wanadoo.fr. [90.116.249.22]) by smtp.gmail.com with ESMTPSA id 74-v6sm619327wmt.31.2018.06.19.09.09.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jun 2018 09:10:00 -0700 (PDT) From: Bartosz Golaszewski To: Grygorii Strashko , "David S . Miller" , Florian Fainelli , Dan Carpenter , Ivan Khoronzhuk , Rob Herring , Lukas Wunner , Kevin Hilman , David Lechner , Sekhar Nori , Andrew Lunn Cc: linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/3] net: phy: set the of_node in the mdiodev's struct device Date: Tue, 19 Jun 2018 18:09:49 +0200 Message-Id: <20180619160950.6283-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180619160950.6283-1-brgl@bgdev.pl> References: <20180619160950.6283-1-brgl@bgdev.pl> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski Copy the of_node over from mii_bus's struct device. This is needed for device-tree systems to be able to check the mdio device's compatible string. Signed-off-by: Bartosz Golaszewski --- drivers/net/phy/phy_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index bd0f339f69fd..a92d5ee61813 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -411,6 +411,7 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, mdiodev->dev.parent = &bus->dev; mdiodev->dev.bus = &mdio_bus_type; mdiodev->dev.type = &mdio_bus_phy_type; + mdiodev->dev.of_node = bus->dev.of_node; mdiodev->bus = bus; mdiodev->bus_match = phy_bus_match; mdiodev->addr = addr;