dmaengine: bcm-sba-raid: Alloc resources before registering DMA device
authorAnup Patel <anup.patel@broadcom.com>
Tue, 22 Aug 2017 09:56:59 +0000 (15:26 +0530)
committerVinod Koul <vinod.koul@intel.com>
Mon, 28 Aug 2017 11:14:24 +0000 (16:44 +0530)
commiteb67744b9af736073d6dffb7fb139f3f05d7e6a8
treeda12ca14aa9536541246be94489b987aa6bb9050
parentf83385142c3a0864e4ac82d852dd0fdb54742ce3
dmaengine: bcm-sba-raid: Alloc resources before registering DMA device

We should allocate DMA channel resources before registering the
DMA device in sba_probe() because we can get DMA request soon
after registering the DMA device. If DMA channel resources are
not allocated before first DMA request then SBA-RAID driver will
crash.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/bcm-sba-raid.c