gianfar: Fix multi-queue support checks @probe()
authorClaudiu Manoil <claudiu.manoil@freescale.com>
Tue, 11 Mar 2014 16:01:24 +0000 (18:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Mar 2014 04:47:52 +0000 (00:47 -0400)
commitb338ce270ed589f8a7b62e239632baa48f947b17
treecbf5b4ece8cd443b52ca7a4b91cc5482adc0ccb3
parent4f1d4d54f99e9302058764833028712c3454266b
gianfar: Fix multi-queue support checks @probe()

priv is not instantiated at gfar_of_init() time, when
parsing the DT for info on supported HW queues.  Before
the netdev can be allocated, the number of supported
queues must be known.  Because the number of supported
queues depends on device type, move the compatibility
checks before netdev allocation.  Local vars are used
to hold the operation mode info before netdev allocation.
This fixes the null accesses for priv->.., in gfar_of_init.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c