Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c5d4e8e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.infradead.org/mtd-2.6:
  mtd: nand: fix build failure and incorrect return from omap_wait()
  mtd: Use BLOCK_NIL consistently in NFTL/INFTL
  mtd: m25p80 timeout too short for worst-case m25p16 devices
  mtd: atmel_nand: Fix typo s/parititions/partitions/
  mtd: cmdlineparts: Use 64-bit format when printing a debug message.
  mtd: maps: Remove BUS_ID_SIZE from integrator_flash
  jffs2: fix another potential leak on error path in scan.c
parents fa172f40 c276aca4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ static struct mtd_partition * newpart(char *s,
	parts[this_part].name = extra_mem;
	extra_mem += name_len + 1;

	dbg(("partition %d: name <%s>, offset %x, size %x, mask flags %x\n",
	dbg(("partition %d: name <%s>, offset %llx, size %llx, mask flags %x\n",
	     this_part,
	     parts[this_part].name,
	     parts[this_part].offset,
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@
#define	SR_SRWD			0x80	/* SR write protect */

/* Define max times to check status register before we give up. */
#define	MAX_READY_WAIT_JIFFIES	(10 * HZ)	/* eg. M25P128 specs 6s max sector erase */
#define	MAX_READY_WAIT_JIFFIES	(40 * HZ)	/* M25P16 specs 40s max chip erase */
#define	CMD_SIZE		4

#ifdef CONFIG_M25PXX_USE_FAST_READ
+6 −5
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ static u16 INFTL_findfreeblock(struct INFTLrecord *inftl, int desperate)
	if (!desperate && inftl->numfreeEUNs < 2) {
		DEBUG(MTD_DEBUG_LEVEL1, "INFTL: there are too few free "
			"EUNs (%d)\n", inftl->numfreeEUNs);
		return 0xffff;
		return BLOCK_NIL;
	}

	/* Scan for a free block */
@@ -281,7 +281,8 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
	silly = MAX_LOOPS;
	while (thisEUN < inftl->nb_blocks) {
		for (block = 0; block < inftl->EraseSize/SECTORSIZE; block ++) {
			if ((BlockMap[block] != 0xffff) || BlockDeleted[block])
			if ((BlockMap[block] != BLOCK_NIL) ||
			    BlockDeleted[block])
				continue;

			if (inftl_read_oob(mtd, (thisEUN * inftl->EraseSize)
@@ -525,7 +526,7 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)
			if (!silly--) {
				printk(KERN_WARNING "INFTL: infinite loop in "
					"Virtual Unit Chain 0x%x\n", thisVUC);
				return 0xffff;
				return BLOCK_NIL;
			}

			/* Skip to next block in chain */
@@ -549,7 +550,7 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)
			 * waiting to be picked up. We're going to have to fold
			 * a chain to make room.
			 */
			thisEUN = INFTL_makefreeblock(inftl, 0xffff);
			thisEUN = INFTL_makefreeblock(inftl, BLOCK_NIL);

			/*
			 * Hopefully we free something, lets try again.
@@ -631,7 +632,7 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block)

	printk(KERN_WARNING "INFTL: error folding to make room for Virtual "
		"Unit Chain 0x%x\n", thisVUC);
	return 0xffff;
	return BLOCK_NIL;
}

/*
+14 −8
Original line number Diff line number Diff line
@@ -42,10 +42,8 @@
#include <mach/hardware.h>
#include <asm/system.h>

#define SUBDEV_NAME_SIZE	(BUS_ID_SIZE + 2)

struct armflash_subdev_info {
	char			name[SUBDEV_NAME_SIZE];
	char			*name;
	struct mtd_info		*mtd;
	struct map_info		map;
	struct flash_platform_data *plat;
@@ -134,6 +132,8 @@ static void armflash_subdev_remove(struct armflash_subdev_info *subdev)
		map_destroy(subdev->mtd);
	if (subdev->map.virt)
		iounmap(subdev->map.virt);
	kfree(subdev->name);
	subdev->name = NULL;
	release_mem_region(subdev->map.phys, subdev->map.size);
}

@@ -177,17 +177,23 @@ static int armflash_probe(struct platform_device *dev)

		if (nr == 1)
			/* No MTD concatenation, just use the default name */
			snprintf(subdev->name, SUBDEV_NAME_SIZE, "%s",
				 dev_name(&dev->dev));
			subdev->name = kstrdup(dev_name(&dev->dev), GFP_KERNEL);
		else
			snprintf(subdev->name, SUBDEV_NAME_SIZE, "%s-%d",
			subdev->name = kasprintf(GFP_KERNEL, "%s-%d",
						 dev_name(&dev->dev), i);
		if (!subdev->name) {
			err = -ENOMEM;
			break;
		}
		subdev->plat = plat;

		err = armflash_subdev_probe(subdev, res);
		if (err)
		if (err) {
			kfree(subdev->name);
			subdev->name = NULL;
			break;
		}
	}
	info->nr_subdev = i;

	if (err)
+1 −1
Original line number Diff line number Diff line
@@ -534,7 +534,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
							 &num_partitions);

	if ((!partitions) || (num_partitions == 0)) {
		printk(KERN_ERR "atmel_nand: No parititions defined, or unsupported device.\n");
		printk(KERN_ERR "atmel_nand: No partitions defined, or unsupported device.\n");
		res = ENXIO;
		goto err_no_partitions;
	}
Loading