[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YHjR244c9MJU9lli@lunn.ch>
Date: Fri, 16 Apr 2021 01:52:59 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 net-next 08/10] net: korina: Get mdio input clock via
common clock framework
> @@ -1079,6 +1078,14 @@ static int korina_probe(struct platform_device *pdev)
> eth_hw_addr_random(dev);
> }
>
> + clk = devm_clk_get(&pdev->dev, NULL);
You should use a name here. It makes future expansion of the binding
easier. devm_clk_get_optional() is probably better. If there is a real
error it will return an error. If the clock does not exist, you get a
NULL. Real errors should cause the problem to fail, but with a NULL
you can use the fallback value.
You also need to document the device tree binding.
Andrew
Powered by blists - more mailing lists