diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-02-07 14:51:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-17 11:57:31 -0300 |
commit | 761f9aa23f2ac187aa1bed58215f09f3c8456295 (patch) | |
tree | 0af5914b300cbff7dc88203dd56e6050fe14da0a | |
parent | 316d9e84a72069e04e483de0d5934c1d75f6a44c (diff) | |
download | blackbird-obmc-linux-761f9aa23f2ac187aa1bed58215f09f3c8456295.tar.gz blackbird-obmc-linux-761f9aa23f2ac187aa1bed58215f09f3c8456295.zip |
[media] solo6x10: fix 'dma from stack' warning
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/staging/media/solo6x10/solo6x10-disp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/media/solo6x10/solo6x10-disp.c b/drivers/staging/media/solo6x10/solo6x10-disp.c index 44d98b8ed749..b529a9670fd6 100644 --- a/drivers/staging/media/solo6x10/solo6x10-disp.c +++ b/drivers/staging/media/solo6x10/solo6x10-disp.c @@ -213,19 +213,21 @@ int solo_set_motion_threshold(struct solo_dev *solo_dev, u8 ch, u16 val) int solo_set_motion_block(struct solo_dev *solo_dev, u8 ch, const u16 *thresholds) { + const unsigned size = sizeof(u16) * 64; u32 off = SOLO_MOT_FLAG_AREA + ch * SOLO_MOT_THRESH_SIZE * 2; - u16 buf[64]; + u16 *buf; int x, y; int ret = 0; - memset(buf, 0, sizeof(buf)); + buf = kzalloc(size, GFP_KERNEL); for (y = 0; y < SOLO_MOTION_SZ; y++) { for (x = 0; x < SOLO_MOTION_SZ; x++) buf[x] = cpu_to_le16(thresholds[y * SOLO_MOTION_SZ + x]); ret |= solo_p2m_dma(solo_dev, 1, buf, - SOLO_MOTION_EXT_ADDR(solo_dev) + off + y * sizeof(buf), - sizeof(buf), 0, 0); + SOLO_MOTION_EXT_ADDR(solo_dev) + off + y * size, + size, 0, 0); } + kfree(buf); return ret; } |