sharpslpart.c (552c69b36ebd966186573b9c7a286b390935cce1) sharpslpart.c (6396bb221514d2876fd6dc0aa2a1f240d99b37bb)
1/*
2 * sharpslpart.c - MTD partition parser for NAND flash using the SHARP FTL
3 * for logical addressing, as used on the PXA models of the SHARP SL Series.
4 *
5 * Copyright (C) 2017 Andrea Adami <andrea.adami@gmail.com>
6 *
7 * Based on SHARP GPL 2.4 sources:
8 * http://support.ezaurus.com/developer/source/source_dl.asp

--- 348 unchanged lines hidden (view full) ---

357 /* cleanup logical mgmt (FTL) */
358 sharpsl_nand_cleanup_ftl(&ftl);
359
360 if (err) {
361 pr_err("sharpslpart: both partition tables are invalid\n");
362 return err;
363 }
364
1/*
2 * sharpslpart.c - MTD partition parser for NAND flash using the SHARP FTL
3 * for logical addressing, as used on the PXA models of the SHARP SL Series.
4 *
5 * Copyright (C) 2017 Andrea Adami <andrea.adami@gmail.com>
6 *
7 * Based on SHARP GPL 2.4 sources:
8 * http://support.ezaurus.com/developer/source/source_dl.asp

--- 348 unchanged lines hidden (view full) ---

357 /* cleanup logical mgmt (FTL) */
358 sharpsl_nand_cleanup_ftl(&ftl);
359
360 if (err) {
361 pr_err("sharpslpart: both partition tables are invalid\n");
362 return err;
363 }
364
365 sharpsl_nand_parts = kzalloc(sizeof(*sharpsl_nand_parts) *
366 SHARPSL_NAND_PARTS, GFP_KERNEL);
365 sharpsl_nand_parts = kcalloc(SHARPSL_NAND_PARTS,
366 sizeof(*sharpsl_nand_parts),
367 GFP_KERNEL);
367 if (!sharpsl_nand_parts)
368 return -ENOMEM;
369
370 /* original names */
371 sharpsl_nand_parts[0].name = "smf";
372 sharpsl_nand_parts[0].offset = le32_to_cpu(buf[0].start);
373 sharpsl_nand_parts[0].size = le32_to_cpu(buf[0].end) -
374 le32_to_cpu(buf[0].start);

--- 24 unchanged lines hidden ---
368 if (!sharpsl_nand_parts)
369 return -ENOMEM;
370
371 /* original names */
372 sharpsl_nand_parts[0].name = "smf";
373 sharpsl_nand_parts[0].offset = le32_to_cpu(buf[0].start);
374 sharpsl_nand_parts[0].size = le32_to_cpu(buf[0].end) -
375 le32_to_cpu(buf[0].start);

--- 24 unchanged lines hidden ---