]> Git Repo - linux.git/commit
net: fman: Map the base address once
authorSean Anderson <[email protected]>
Fri, 2 Sep 2022 21:57:27 +0000 (17:57 -0400)
committerDavid S. Miller <[email protected]>
Mon, 5 Sep 2022 13:27:39 +0000 (14:27 +0100)
commit262f2b782e255b7959b6b8fdfd9347558a7003a2
tree058ba3240598aa4c7869b054a1ad2e2e402512f9
parent45fa34bfaa52737b3d1c77ad31044c8fd4f4698a
net: fman: Map the base address once

We don't need to remap the base address from the resource twice (once in
mac_probe() and again in set_fman_mac_params()). We still need the
resource to get the end address, but we can use a single function call
to get both at once.

While we're at it, use platform_get_mem_or_io and devm_request_resource
to map the resource. I think this is the more "correct" way to do things
here, since we use the pdev resource, instead of creating a new one.
It's still a bit tricky, since we need to ensure that the resource is a
child of the fman region when it gets requested.

Signed-off-by: Sean Anderson <[email protected]>
Acked-by: Camelia Groza <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
drivers/net/ethernet/freescale/dpaa/dpaa_eth_sysfs.c
drivers/net/ethernet/freescale/fman/mac.c
drivers/net/ethernet/freescale/fman/mac.h
This page took 0.056386 seconds and 4 git commands to generate.