mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 13:22:55 +00:00
mfd: stmpe: Rid variable length array Sparse warnings
Numbers are generated by taking the largest currently used values. drivers/mfd/stmpe.c:252:17: warning: Variable length array is used. drivers/mfd/stmpe.c:857:16: warning: Variable length array is used. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
87bd1c9250
commit
7929fa7740
@ -249,7 +249,7 @@ int stmpe_set_altfunc(struct stmpe *stmpe, u32 pins, enum stmpe_block block)
|
||||
int af_bits = variant->af_bits;
|
||||
int numregs = DIV_ROUND_UP(stmpe->num_gpios * af_bits, 8);
|
||||
int mask = (1 << af_bits) - 1;
|
||||
u8 regs[numregs];
|
||||
u8 regs[8];
|
||||
int af, afperreg, ret;
|
||||
|
||||
if (!variant->get_altfunc)
|
||||
@ -854,7 +854,7 @@ static irqreturn_t stmpe_irq(int irq, void *data)
|
||||
struct stmpe_variant_info *variant = stmpe->variant;
|
||||
int num = DIV_ROUND_UP(variant->num_irqs, 8);
|
||||
u8 israddr;
|
||||
u8 isr[num];
|
||||
u8 isr[3];
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user