dmatest: adjust invalid module parameters for number of source buffers
commit8be9e32b310cd8c4302991c8ff6692689c7d9d76
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 27 Oct 2012 15:49:32 +0000 (28 00:49 +0900)
committerVinod Koul <vinod.koul@intel.com>
Tue, 8 Jan 2013 06:04:55 +0000 (7 22:04 -0800)
tree7d2ae649564d9cab6d7228e1cb0c8f4dfbe965be
parent91998261dd0d5aefb56d87cef84f7810c32f6194
dmatest: adjust invalid module parameters for number of source buffers

DMA Engine test module has module parameters to set the number of source
buffers for xor and pq operations.  We can set these values larger than the
maximum number of sources that the device can support.  These values are
not adjusted and the unsupported number of source buffers are passed to the
device.  But most drivers don't check it, so unexpected results will happen.

This makes an appropriate adjustment for these module parameters before use.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/dmatest.c