[RFC PATCH 9/9] nand/denali: support MTD partitioning
Artem Bityutskiy
dedekind1 at gmail.com
Fri May 6 10:33:15 EDT 2011
On Fri, 2011-05-06 at 15:29 +0100, Jamie Iles wrote:
> If CONFIG_MTD_PARTITION is enabled then take the partitions from the
> platform data.
>
> Cc: David Woodhouse <dwmw2 at infradead.org>
> Cc: Chuanxiao Dong <chuanxiao.dong at intel.com>
> Signed-off-by: Jamie Iles <jamie at jamieiles.com>
> ---
> drivers/mtd/nand/denali.c | 8 ++++++++
> include/linux/platform_data/denali.h | 6 +++++-
> 2 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
> index c79009f..ae954de 100644
> --- a/drivers/mtd/nand/denali.c
> +++ b/drivers/mtd/nand/denali.c
> @@ -23,6 +23,7 @@
> #include <linux/mutex.h>
> #include <linux/slab.h>
> #include <linux/mtd/mtd.h>
> +#include <linux/mtd/partitions.h>
> #include <linux/module.h>
> #include <linux/platform_data/denali.h>
>
> @@ -1563,7 +1564,14 @@ int denali_init(struct denali_nand_info *denali)
> goto failed_req_irq;
> }
>
> +#ifdef CONFIG_MTD_PARTITIONS
> + if (pdata && pdata->parts) {
> + ret = add_mtd_partitions(&denali->mtd, pdata->parts,
> + pdata->nr_parts);
> + } else
> +#endif /* CONFIG_MTD_PARTITIONS */
> ret = add_mtd_device(&denali->mtd);
> +
Oops:
http://www.linux-mtd.infradead.org/doc/general.html#L_partitions_ban
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list