Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104787
b: refs/heads/master
c: eadcf0d
h: refs/heads/master
i:
  104785: b933720
  104783: 187e66e
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jul 22, 2008
1 parent 5ab02de commit 52d6fbd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 89bcb05d9bbf8bd559988bca4f2579defd28d008
refs/heads/master: eadcf0d704a46979c29984fa05f1fc413c775bcb
8 changes: 5 additions & 3 deletions trunk/drivers/mtd/devices/block2mtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
{
struct block_device *bdev;
struct block2mtd_dev *dev;
char *name;

if (!devname)
return NULL;
Expand Down Expand Up @@ -279,12 +280,13 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)

/* Setup the MTD structure */
/* make the name contain the block device in */
dev->mtd.name = kmalloc(sizeof("block2mtd: ") + strlen(devname),
name = kmalloc(sizeof("block2mtd: ") + strlen(devname) + 1,
GFP_KERNEL);
if (!dev->mtd.name)
if (!name)
goto devinit_err;

sprintf(dev->mtd.name, "block2mtd: %s", devname);
sprintf(name, "block2mtd: %s", devname);
dev->mtd.name = name;

dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
dev->mtd.erasesize = erase_size;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/mtd/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ typedef union {
*/

struct map_info {
char *name;
const char *name;
unsigned long size;
resource_size_t phys;
#define NO_XIP (-1UL)
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/mtd/mtd.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct mtd_info {
u_int32_t oobavail; // Available OOB bytes per block

// Kernel-only stuff starts here.
char *name;
const char *name;
int index;

/* ecc layout structure pointer - read only ! */
Expand Down

0 comments on commit 52d6fbd

Please sign in to comment.