diff options
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/Makefile | 2 | ||||
-rw-r--r-- | drivers/mtd/devices/block2mtd.c | 4 | ||||
-rw-r--r-- | drivers/mtd/devices/pmc551.c | 4 | ||||
-rw-r--r-- | drivers/mtd/devices/sst25l.c | 11 |
4 files changed, 4 insertions, 17 deletions
diff --git a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile index ab5c9b92ac82..f3226b1d38fc 100644 --- a/drivers/mtd/devices/Makefile +++ b/drivers/mtd/devices/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | # | 1 | # |
2 | # linux/drivers/devices/Makefile | 2 | # linux/drivers/mtd/devices/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_MTD_DOC2000) += doc2000.o | 5 | obj-$(CONFIG_MTD_DOC2000) += doc2000.o |
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index ce6424008ed9..93651865ddbe 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -276,12 +276,10 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) | |||
276 | 276 | ||
277 | /* Setup the MTD structure */ | 277 | /* Setup the MTD structure */ |
278 | /* make the name contain the block device in */ | 278 | /* make the name contain the block device in */ |
279 | name = kmalloc(sizeof("block2mtd: ") + strlen(devname) + 1, | 279 | name = kasprintf(GFP_KERNEL, "block2mtd: %s", devname); |
280 | GFP_KERNEL); | ||
281 | if (!name) | 280 | if (!name) |
282 | goto devinit_err; | 281 | goto devinit_err; |
283 | 282 | ||
284 | sprintf(name, "block2mtd: %s", devname); | ||
285 | dev->mtd.name = name; | 283 | dev->mtd.name = name; |
286 | 284 | ||
287 | dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK; | 285 | dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK; |
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c index d2fd550f7e09..fc8ea0a57ac2 100644 --- a/drivers/mtd/devices/pmc551.c +++ b/drivers/mtd/devices/pmc551.c | |||
@@ -668,7 +668,7 @@ static int __init init_pmc551(void) | |||
668 | { | 668 | { |
669 | struct pci_dev *PCI_Device = NULL; | 669 | struct pci_dev *PCI_Device = NULL; |
670 | struct mypriv *priv; | 670 | struct mypriv *priv; |
671 | int count, found = 0; | 671 | int found = 0; |
672 | struct mtd_info *mtd; | 672 | struct mtd_info *mtd; |
673 | u32 length = 0; | 673 | u32 length = 0; |
674 | 674 | ||
@@ -695,7 +695,7 @@ static int __init init_pmc551(void) | |||
695 | /* | 695 | /* |
696 | * PCU-bus chipset probe. | 696 | * PCU-bus chipset probe. |
697 | */ | 697 | */ |
698 | for (count = 0; count < MAX_MTD_DEVICES; count++) { | 698 | for (;;) { |
699 | 699 | ||
700 | if ((PCI_Device = pci_get_device(PCI_VENDOR_ID_V3_SEMI, | 700 | if ((PCI_Device = pci_get_device(PCI_VENDOR_ID_V3_SEMI, |
701 | PCI_DEVICE_ID_V3_SEMI_V370PDC, | 701 | PCI_DEVICE_ID_V3_SEMI_V370PDC, |
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c index fe17054ee2fe..bcf040beb835 100644 --- a/drivers/mtd/devices/sst25l.c +++ b/drivers/mtd/devices/sst25l.c | |||
@@ -411,17 +411,6 @@ static int __init sst25l_probe(struct spi_device *spi) | |||
411 | flash->mtd.erasesize, flash->mtd.erasesize / 1024, | 411 | flash->mtd.erasesize, flash->mtd.erasesize / 1024, |
412 | flash->mtd.numeraseregions); | 412 | flash->mtd.numeraseregions); |
413 | 413 | ||
414 | if (flash->mtd.numeraseregions) | ||
415 | for (i = 0; i < flash->mtd.numeraseregions; i++) | ||
416 | DEBUG(MTD_DEBUG_LEVEL2, | ||
417 | "mtd.eraseregions[%d] = { .offset = 0x%llx, " | ||
418 | ".erasesize = 0x%.8x (%uKiB), " | ||
419 | ".numblocks = %d }\n", | ||
420 | i, (long long)flash->mtd.eraseregions[i].offset, | ||
421 | flash->mtd.eraseregions[i].erasesize, | ||
422 | flash->mtd.eraseregions[i].erasesize / 1024, | ||
423 | flash->mtd.eraseregions[i].numblocks); | ||
424 | |||
425 | if (mtd_has_partitions()) { | 414 | if (mtd_has_partitions()) { |
426 | struct mtd_partition *parts = NULL; | 415 | struct mtd_partition *parts = NULL; |
427 | int nr_parts = 0; | 416 | int nr_parts = 0; |