]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 27 Sep 2022 19:15:19 +0000 (22:15 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Sep 2022 02:14:56 +0000 (19:14 -0700)
commitc998baf90447ea77f47a06d0abcffe2f925189cc
tree1ae5817a8607031bee550bf6ccd6628d08bb91e9
parenta283a70f746eb357a8c3162b24d1e95c79dd9e7c
net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources

Use less verbose resource definitions in vsc9959 and vsc9953. This also
sets IORESOURCE_MEM in the constant array of resources, so we don't have
to do this from felix_init_structs() - in fact, in the future, we may
even support IORESOURCE_REG resources.

Note that this macro takes start and length as argument, and we had
start and end before. So transform end into length.

While at it, sort the resources according to their offset.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/dsa/ocelot/seville_vsc9953.c