net: enetc: pass bd_count as an argument to enetc_setup_cbdr
authorVladimir Oltean <olteanv@gmail.com>
Wed, 10 Mar 2021 12:03:45 +0000 (14:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Mar 2021 21:14:15 +0000 (13:14 -0800)
commit5b4daa7f1256669fe4eb215c77a88c55ad24f26e
tree30bda6afa91f6525fa6a131f300a6e087b57783a
parent0bfde022b345763df70fdc73bcb5ab8943589487
net: enetc: pass bd_count as an argument to enetc_setup_cbdr

It makes no sense from an API perspective to first initialize some
portion of struct enetc_cbdr outside enetc_setup_cbdr, then leave that
function to initialize the rest. enetc_setup_cbdr should be able to
perform all initialization given a zero-initialized struct enetc_cbdr.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc.h
drivers/net/ethernet/freescale/enetc/enetc_cbdr.c
drivers/net/ethernet/freescale/enetc/enetc_pf.c