mdio: mdio-mux-mmioreg: Use of_property_read_reg() to parse "reg"
Subsystems (3)
PATCH 1/1 mdio: mdio-mux-mmioreg: Use of_property_read_reg() to parse "reg"
Use the recently added of_property_read_reg() helper to get the untranslated "reg" address value.
Signed-off-by Rob Herring <[email protected]>
--- drivers/net/mdio/mdio-mux-mmioreg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/mdio/mdio-mux-mmioreg.c +4 -3
@@ -140,14 +140,15 @@ static int mdio_mux_mmioreg_probe(struct platform_device *pdev)* set any bits outside of the 'mask'. */ for_each_available_child_of_node (np, np2) { - iprop =of_get_property (np2,"reg" , &len); -if (!iprop || len !=sizeof (uint32_t )) { +u64 reg; + +if (of_property_read_reg (np2,0 , ®,NULL )) {dev_err (&pdev->dev,"mdio-mux child node %pOF is " "missing a 'reg' property\n" , np2);of_node_put (np2);return -ENODEV ; } -if (be32_to_cpup (iprop) & ~s->mask) { +if ((u32 )reg & ~s->mask) {dev_err (&pdev->dev,"mdio-mux child node %pOF has " "a 'reg' value with unmasked bits\n" , np2);
Signature · 1 line
2.39.2
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 7 lines · On Fri, 9 Jun 2023 12:26:16 -0600 you wrote:
Use the recently added
of_property_read_reg()helper to get the untranslated "reg" address value.Signed-off-by Rob Herring <[email protected]>--- drivers/net/mdio/mdio-mux-mmioreg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Here is the summary with links:
- [net-next] mdio: mdio-mux-mmioreg: Use of_property_read_reg() to parse "reg"
https://git.kernel.org/netdev/net-next/c/b30a1f305b7b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html