Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131827
b: refs/heads/master
c: 5f87760
h: refs/heads/master
i:
  131825: f8395a2
  131823: 90bb2ac
v: v3
  • Loading branch information
Alan Cox authored and David Woodhouse committed Jan 11, 2009
1 parent 3adffab commit b0c4b77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57c1a24ee276a33190008243f986419e122c0dea
refs/heads/master: 5f877607cdfe8b60bf96fb96e527e0ce2a21e68b
8 changes: 8 additions & 0 deletions trunk/drivers/mtd/chips/map_rom.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ static int maprom_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int maprom_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
static void maprom_nop (struct mtd_info *);
static struct mtd_info *map_rom_probe(struct map_info *map);
static int maprom_erase (struct mtd_info *mtd, struct erase_info *info);

static struct mtd_chip_driver maprom_chipdrv = {
.probe = map_rom_probe,
Expand All @@ -42,6 +43,7 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
mtd->read = maprom_read;
mtd->write = maprom_write;
mtd->sync = maprom_nop;
mtd->erase = maprom_erase;
mtd->flags = MTD_CAP_ROM;
mtd->erasesize = map->size;
mtd->writesize = 1;
Expand Down Expand Up @@ -71,6 +73,12 @@ static int maprom_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *re
return -EIO;
}

static int maprom_erase (struct mtd_info *mtd, struct erase_info *info)
{
/* We do our best 8) */
return -EROFS;
}

static int __init map_rom_init(void)
{
register_mtd_chip_driver(&maprom_chipdrv);
Expand Down

0 comments on commit b0c4b77

Please sign in to comment.