Message ID | 20220922071028.18012-4-arun.ramadoss@microchip.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 68ccceaef0b46935e805f4c1cfd20b6af0e6fc77 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: microchip: ksz9477: enable interrupt for internal phy link detection | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/cc_maintainers | success | CCed 11 of 11 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 12 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
On Thu, Sep 22, 2022 at 12:40:25PM +0530, Arun Ramadoss wrote: > Currently, if the mdio node is not present in the dts file then > lan937x_mdio_register return -ENODEV and entire probing process fails. > To make the mdio_register generic for all ksz series switches and to > maintain back-compatibility with existing dts file, return -ENODEV is > replaced with return 0. > > Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
diff --git a/drivers/net/dsa/microchip/lan937x_main.c b/drivers/net/dsa/microchip/lan937x_main.c index 2664331cc743..d7382a77d454 100644 --- a/drivers/net/dsa/microchip/lan937x_main.c +++ b/drivers/net/dsa/microchip/lan937x_main.c @@ -214,10 +214,8 @@ static int lan937x_mdio_register(struct ksz_device *dev) int ret; mdio_np = of_get_child_by_name(dev->dev->of_node, "mdio"); - if (!mdio_np) { - dev_err(ds->dev, "no MDIO bus node\n"); - return -ENODEV; - } + if (!mdio_np) + return 0; bus = devm_mdiobus_alloc(ds->dev); if (!bus) {
Currently, if the mdio node is not present in the dts file then lan937x_mdio_register return -ENODEV and entire probing process fails. To make the mdio_register generic for all ksz series switches and to maintain back-compatibility with existing dts file, return -ENODEV is replaced with return 0. Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com> --- drivers/net/dsa/microchip/lan937x_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)