[PATCH 10/13] mtd: nand: fsmc: finally remove fsmc_nand_platform_data
Linus Walleij
linus.walleij at linaro.org
Thu Mar 23 03:05:08 PDT 2017
On Tue, Mar 21, 2017 at 11:04 AM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> 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 at free-electrons.com>
Sweet!
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
Yours,
Linus Walleij
More information about the linux-mtd
mailing list