Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6321461imu; Mon, 21 Jan 2019 07:00:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN4WRCsj3vUcfETyF9h3XFrWHZogVcuLQe/EYzexVCV2uK1vT0ahwIO+G2NBCRn8ziZq3lH+ X-Received: by 2002:a17:902:31a4:: with SMTP id x33mr29971459plb.41.1548082831848; Mon, 21 Jan 2019 07:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548082831; cv=none; d=google.com; s=arc-20160816; b=Qxn/nR+Rfu+H5WSaTpLmTz8aDJiQomoIa1Bctkud4Pu1hd0W0GCWpA/e3ZjZwnToqN EpJu8f+TC7VKTQf0YUB0ERUNj/h+RT9A6wGxEAu9rS5NUFZJIlpLagxlP9GihUKn4U67 LDf0Zbtqhx20eMxZRgnxNOGRSrKj2jxY8ylIICPkvwnT0KhLRShIwZcl6I08JUeQLli1 NB/3A2hDoV8Alqq0r5+f76DNcouH9+KoatsLgD1Nk5MaJVbOW3nrfJWVR/KxdRXrSN3n 1MOKZvEpEnVEQtMCdG1Uf5/uic8tG5sMmYsvTopn0hGFYqV4Yw/DHIdIH+04KU34fKzw iKww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=JT3s8OPkL95HsDHHmHtzAGT4/3OLRSzmKQWITSuh0pc=; b=Yy77kO2/+V4Me9FgQvXy7Erx/214emXhOp1r7CrobmUKvonDb4J4V2E0zhhPzIgbQW PvQIu4acAj0rMS8kN1IetzXlufqDumSP1ixvVMNyXbu1LPhsbhQhVfn0tX28/ZQF+fhP f15q/GkngRM2qV8OaLVsfPvtkii7Ly2Ix2S4kdqos2e0ZKoU0maohiuqP6qZkCMtUsBP rizRZd/ftU5I488m/vNlkNksAvTIh2ospwymA149uVjd+1cfWCEPp77bJ7AhJ+WlWxjd 59HKKyvOrR6ohDIjF72+GIBrws8wrPMWqljPoLqM5vUiA/rR91e21L4/40HZ3uIeAYpz mHWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=nT6thWHx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l184si12845994pgd.523.2019.01.21.07.00.14; Mon, 21 Jan 2019 07:00:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=nT6thWHx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729814AbfAUO6v (ORCPT + 99 others); Mon, 21 Jan 2019 09:58:51 -0500 Received: from mail.kmu-office.ch ([178.209.48.109]:44336 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729474AbfAUO6u (ORCPT ); Mon, 21 Jan 2019 09:58:50 -0500 Received: from trochilidae.toradex.int (unknown [46.140.72.82]) by mail.kmu-office.ch (Postfix) with ESMTPSA id C9E175C0231; Mon, 21 Jan 2019 15:58:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1548082728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=JT3s8OPkL95HsDHHmHtzAGT4/3OLRSzmKQWITSuh0pc=; b=nT6thWHxzyXiYd4ICXsna52Gw/Z1ai8eaibyupD741JZgPve/a4TpraP60xkuBlXl6Z397 tqQMrErE5tkrRXEEsQdapCWyitUfiBX7vPJc0t8s0SOyzzS1GzBt2MuJac+zELK0NRHUJH u8iQgOy+FL7/67Llwz5ldeGp8Gp3fyY= From: Stefan Agner To: fugang.duan@nxp.com, davem@davemloft.net Cc: marcel.ziswiler@toradex.com, max.krummenacher@toradex.com, dev@pschenker.ch, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner Subject: [PATCH] net: fec: get regulator optional Date: Mon, 21 Jan 2019 15:58:47 +0100 Message-Id: <20190121145847.30223-1-stefan@agner.ch> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to the device tree binding the phy-supply property is optional. Use the regulator_get_optional API accordingly. The code already handles NULL just fine. This gets rid of the following warning: fec 2188000.ethernet: 2188000.ethernet supply phy not found, using dummy regulator Signed-off-by: Stefan Agner --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 6db69ba30dcd..c8315d880c8c 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3479,7 +3479,7 @@ fec_probe(struct platform_device *pdev) if (ret) goto failed_clk_ipg; - fep->reg_phy = devm_regulator_get(&pdev->dev, "phy"); + fep->reg_phy = devm_regulator_get_optional(&pdev->dev, "phy"); if (!IS_ERR(fep->reg_phy)) { ret = regulator_enable(fep->reg_phy); if (ret) { -- 2.20.1