Skip to content

Commit 5f27092

Browse files
Hans-Frieder Vogtkuba-moo
authored andcommitted
net: phy: aquantia: search for firmware-name in fwnode
Allow the firmware name of an Aquantia PHY alternatively be provided by the property "firmware-name" of a swnode. This software node may be provided by the MAC or MDIO driver. Signed-off-by: Hans-Frieder Vogt <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 74e4264 commit 5f27092

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/phy/aquantia/aquantia_firmware.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,11 @@ static int aqr_firmware_load_fs(struct phy_device *phydev)
328328
const char *fw_name;
329329
int ret;
330330

331-
ret = of_property_read_string(dev->of_node, "firmware-name",
332-
&fw_name);
333-
if (ret)
331+
ret = device_property_read_string(dev, "firmware-name", &fw_name);
332+
if (ret) {
333+
phydev_err(phydev, "failed to read firmware-name: %d\n", ret);
334334
return ret;
335+
}
335336

336337
ret = request_firmware(&fw, fw_name, dev);
337338
if (ret) {

0 commit comments

Comments
 (0)