Messages in this thread Patch in this message |  | | From | Andy Shevchenko <> | | Subject | [PATCH net-next v1 4/5] net/fsl: xgmac_mdio: Reuse existing pointer to fwnode | | Date | Mon, 4 May 2026 09:29:55 +0200 |
| |
The probe function has already been using pointer to fwnode. Reuse it instead of doing this several times.
While at it, amend the header inclusions regarding to the used APIs.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/net/ethernet/freescale/xgmac_mdio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index b63c8a3d6daf..f31c36b8ec98 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -12,16 +12,16 @@ * kind, whether express or implied. */ -#include <linux/acpi.h> #include <linux/clk.h> #include <linux/fwnode_mdio.h> #include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/mdio.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of.h> #include <linux/phy.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/slab.h> /* Number of microseconds to wait for a register to respond */ @@ -407,12 +407,12 @@ static int xgmac_mdio_probe(struct platform_device *pdev) /* For both ACPI and DT cases, endianness of MDIO controller * needs to be specified using "little-endian" property. */ - priv->is_little_endian = device_property_read_bool(&pdev->dev, + priv->is_little_endian = fwnode_property_read_bool(fwnode, "little-endian"); - priv->has_a009885 = device_property_read_bool(&pdev->dev, + priv->has_a009885 = fwnode_property_read_bool(fwnode, "fsl,erratum-a009885"); - priv->has_a011043 = device_property_read_bool(&pdev->dev, + priv->has_a011043 = fwnode_property_read_bool(fwnode, "fsl,erratum-a011043"); xgmac_mdio_set_suppress_preamble(bus); -- 2.50.1
|  |