Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274818
b: refs/heads/master
c: 3761a6d
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent ecc249e commit 00d815a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 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: 3b36013cf9cc1a1da93ad6bb8f6d3b0221f67e42
refs/heads/master: 3761a6ddacc83e5a6b4482d98fbf212805381486
18 changes: 1 addition & 17 deletions trunk/drivers/mtd/devices/lart.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,14 @@
/* debugging */
//#define LART_DEBUG

/* partition support */
#define HAVE_PARTITIONS

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mtd/mtd.h>
#ifdef HAVE_PARTITIONS
#include <linux/mtd/partitions.h>
#endif

#ifndef CONFIG_SA1100_LART
#error This is for LART architecture only
Expand Down Expand Up @@ -598,7 +593,6 @@ static struct mtd_erase_region_info erase_regions[] = {
}
};

#ifdef HAVE_PARTITIONS
static struct mtd_partition lart_partitions[] = {
/* blob */
{
Expand All @@ -619,7 +613,7 @@ static struct mtd_partition lart_partitions[] = {
.size = INITRD_LEN, /* MTDPART_SIZ_FULL */
}
};
#endif
#define NUM_PARTITIONS ARRAY_SIZE(lart_partitions)

static int __init lart_flash_init (void)
{
Expand Down Expand Up @@ -668,7 +662,6 @@ static int __init lart_flash_init (void)
result,mtd.eraseregions[result].erasesize,mtd.eraseregions[result].erasesize / 1024,
result,mtd.eraseregions[result].numblocks);

#ifdef HAVE_PARTITIONS
printk ("\npartitions = %d\n", ARRAY_SIZE(lart_partitions));

for (result = 0; result < ARRAY_SIZE(lart_partitions); result++)
Expand All @@ -681,25 +674,16 @@ static int __init lart_flash_init (void)
result,lart_partitions[result].offset,
result,lart_partitions[result].size,lart_partitions[result].size / 1024);
#endif
#endif

#ifndef HAVE_PARTITIONS
result = mtd_device_register(&mtd, NULL, 0);
#else
result = mtd_device_register(&mtd, lart_partitions,
ARRAY_SIZE(lart_partitions));
#endif

return (result);
}

static void __exit lart_flash_exit (void)
{
#ifndef HAVE_PARTITIONS
mtd_device_unregister(&mtd);
#else
mtd_device_unregister(&mtd);
#endif
}

module_init (lart_flash_init);
Expand Down

0 comments on commit 00d815a

Please sign in to comment.