From patchwork Tue Sep 15 14:45:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1364430 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GTKoCOn9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrR4F4pTbz9sVT for ; Wed, 16 Sep 2020 00:50:53 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6B2A5823DC; Tue, 15 Sep 2020 16:46:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GTKoCOn9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F2F0D8238A; Tue, 15 Sep 2020 16:46:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 658B38235F for ; Tue, 15 Sep 2020 16:46:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id q63so4475371qkf.3 for ; Tue, 15 Sep 2020 07:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ybxioNLdW+kuKIFddHkO/gf/lrDgCuWEIqaIW32VhiE=; b=GTKoCOn9qRS4jQF4p/dOdwItH/ybK53BUxVn45Xa/Bbp9R5Xu1hZFsz+TurpKQf/37 zcmDycJ9u44BxPZcAZbYsSs1SGED6hwJvceHj3uDzyc421jtMc65yYmhSimjEX5PAL7+ gP6KAKAIwk+3gAkwJrKXh84P+f+hUMEf2lN455wMGjThlN1e/EjGMACH12XEQWVPPg2B bJAshaqx+qjZ1ub/ews6+T5KIbZR1BMKZQASsERXPc/+yDB3dpJkygP7uWv1ZoQEReO7 xoRqc2swx3qkl4BdvokHqH0WS+cNs5/QJrDuk0yEnog7ZK29WwJMu2iTQAZhmpQ00FkH f3mg== 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:mime-version:content-transfer-encoding; bh=ybxioNLdW+kuKIFddHkO/gf/lrDgCuWEIqaIW32VhiE=; b=ON86XxhhhPIl35r+i2+M9HXpe/nc/kSbP9Fl1x3VxhKHil2s765BBpyDaV+bUJsGOw uG3QVPOj9OrToAYiUWpalmMIomoMU/U6/pJd7yjPo6ib4+9gu80QA/0mvddzlPdFQ7DE fAoLd+BiNJXo2nUqXsjYhooN+KCWP8xX35XVCAF6L5jZqtDe0DYM61WcSlFXIr0oHQsp +4E5yPM6LFiIYCO73scbloQb5kWtzVbO9LxvGT7Re9pXnF6NsEnuYu4BtfS2jM9wrYBD NSyG5FCrMG3Plr9+pMvnX0TCrHjE3SiTH0IActPS3cr94Vy6MfolPtYkSlpmanE1Ho3g I6Ug== X-Gm-Message-State: AOAM532W7eyEE08FPOmxw8wXBN/Nt7oIq78aZvIt7YY4E5Qr+7ujfEVc 98MS204n44UrX6Lvj7bgpMcCSUt1PmoZpmFo X-Google-Smtp-Source: ABdhPJwBuJzjIa05cVrkbQjY6mt6BnXdwuYgmsj379OVeANxeJHUpqltCxce7Uozwbfic1Uw7zbhOg== X-Received: by 2002:a37:a347:: with SMTP id m68mr17957486qke.81.1600181163211; Tue, 15 Sep 2020 07:46:03 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id g18sm16371799qko.126.2020.09.15.07.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 07:46:02 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Sean Anderson , Jagan Teki , Joe Hershberger , Simon Glass Subject: [PATCH v2 24/46] net: sun8i_emac: Fix not calling dev_xxx with a device Date: Tue, 15 Sep 2020 10:45:00 -0400 Message-Id: <20200915144522.509493-25-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915144522.509493-1-seanga2@gmail.com> References: <20200915144522.509493-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Pass a udevice into a few functions so `dev` is defined. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - New drivers/net/sun8i_emac.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 546cc6ccb6..1dae81c7bf 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -663,7 +663,8 @@ static int sun8i_eth_write_hwaddr(struct udevice *dev) return _sun8i_write_hwaddr(priv, pdata->enetaddr); } -static int sun8i_emac_board_setup(struct emac_eth_dev *priv) +static int sun8i_emac_board_setup(struct udevice *dev, + struct emac_eth_dev *priv) { int ret; @@ -833,7 +834,7 @@ static int sun8i_emac_eth_probe(struct udevice *dev) priv->mac_reg = (void *)pdata->iobase; - ret = sun8i_emac_board_setup(priv); + ret = sun8i_emac_board_setup(dev, priv); if (ret) return ret; @@ -854,7 +855,7 @@ static const struct eth_ops sun8i_emac_eth_ops = { .stop = sun8i_emac_eth_stop, }; -static int sun8i_get_ephy_nodes(struct emac_eth_dev *priv) +static int sun8i_get_ephy_nodes(struct udevice *dev, struct emac_eth_dev *priv) { int emac_node, ephy_node, ret, ephy_handle; @@ -986,7 +987,7 @@ static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev) } if (priv->variant == H3_EMAC) { - ret = sun8i_get_ephy_nodes(priv); + ret = sun8i_get_ephy_nodes(dev, priv); if (ret) return ret; }