mtd: nand: fsmc: finally remove fsmc_nand_platform_data
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 21 Mar 2017 10:04:02 +0000 (11:04 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 23 Mar 2017 10:11:27 +0000 (11:11 +0100)
commita1b1e1d5bdfe79e3d3b28387dd43bb16531be5a4
treeff603134b7728d4168314ba6c704131d8d39db76
parentc0d218c81621d847472e01f227eab3e4f0902ce2
mtd: nand: fsmc: finally remove fsmc_nand_platform_data

Since the driver now only supports DT probing, it doesn't make a lot of
sense to have a private data structure called platform_data, fill it in
with information coming from the DT, and then copying this into the
driver-specific structure fsmc_nand_data.

So instead, we remove fsmc_nand_platform_data entirely, and have
fsmc_nand_probe_config_dt() fill in the fsmc_nand_data structure
directly.

This requires calling fsmc_nand_probe_config_dt() after fsmc_nand_data
has been allocated instead of before.

Also, as an added bonus, we now propagate properly the return value of
fsmc_nand_probe_config_dt() instead of returning -ENODEV on failure. The
error message is also removed, since it no longer made any sense.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/fsmc_nand.c