]> git.baikalelectronics.ru Git - kernel.git/commit
[media] tc358743: don't use variable length array for I2C writes
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 11 Aug 2015 15:18:30 +0000 (12:18 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 16 Aug 2015 15:55:07 +0000 (12:55 -0300)
commitef8b72edca028fc214418f37d3e35c5469434bca
tree023a5b137c228221c64d191179a5ad8a09d3ecb9
parent613f4e8dbc1956ffa3bfb5bf76ced3134cda5eab
[media] tc358743: don't use variable length array for I2C writes

drivers/media/i2c/tc358743.c:148:19: warning: Variable length array is used.

As the maximum size is 1026, we can't use dynamic var, as it
would otherwise spend 1056 bytes of the stack at i2c_wr() function.

So, allocate a buffer with the allowed maximum size together with
the state var.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Mats Randgaard <matrandg@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/i2c/tc358743.c