OSDN Git Service

mvpp2: refactor BM pool functions
authorMatteo Croce <mcroce@redhat.com>
Mon, 2 Sep 2019 10:21:36 +0000 (12:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Sep 2019 19:07:46 +0000 (12:07 -0700)
commit136163618e3a9db403ef832ac32ab0b173ef503e
tree42624e95a5b35eff3b5cb01d55ad030bc64605b6
parent4ba0ebbc6cdecb9fad7c551a3d97b172ebc7b2fa
mvpp2: refactor BM pool functions

Refactor mvpp2_bm_pool_create(), mvpp2_bm_pool_destroy() and
mvpp2_bm_pools_init() so that they accept a struct device instead
of a struct platform_device, as they just need platform_device->dev.

Removing such dependency makes the BM code more reusable in context
where we don't have a pointer to the platform_device.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c