mlxsw: Invoke driver's init/fini methods only if defined
authorVadim Pasternak <vadimp@mellanox.com>
Wed, 16 Nov 2016 14:20:45 +0000 (15:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Nov 2016 04:29:04 +0000 (23:29 -0500)
commit4ebd00bc5ffc747f07fe23b1993adc9e6220ba2f
treea5bec95e14b2df8d69495c2af7901e06043d1511
parent6882b0aee180f2797b8803bdf699aa45c2e5f2d6
mlxsw: Invoke driver's init/fini methods only if defined

We are going to add a minimal driver on top of the mlxsw core
infrastructure, which will be mainly used for hardware monitoring in
Baseboard management controller (BMC) installations.

Unlike the switch drivers (e.g., spectrum, switchx2), this driver does not
initialize the ASIC and therefore doesn't need to implement the init() and
fini() methods in its 'mlxsw_driver' struct.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c