mtd: nand: Fix build issues due to an anonymous union
authorMiquel Raynal <miquel.raynal@free-electrons.com>
Fri, 19 Jan 2018 18:11:27 +0000 (19:11 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Sat, 20 Jan 2018 09:39:02 +0000 (10:39 +0100)
commitc1a72e2dbb4abb90bd408480d7c48ba40cb799ce
tree60ee614bf74b313dfcd00937b8e9af403e878eb0
parentc495a9275eeca0bbc9358de7200e58184e864aeb
mtd: nand: Fix build issues due to an anonymous union

GCC-4.4.4 raises errors when assigning a parameter in an anonymous
union, leading to this kind of failure:

drivers/mtd/nand/marvell_nand.c:1936:
    warning: missing braces around initializer
    warning: (near initialization for '(anonymous)[1].<anonymous>')
    error: unknown field 'data' specified in initializer
    error: unknown field 'addr' specified in initializer

Work around the situation by naming these unions.

Fixes: 8878b126df76 ("mtd: nand: add ->exec_op() implementation")
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Tested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/nand_base.c
include/linux/mtd/rawnand.h