Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252563
b: refs/heads/master
c: 6b57c11
h: refs/heads/master
i:
  252561: cdf8d3b
  252559: 8793b95
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent fbeb04e commit ac38c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 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: ff6e1b26d510b1d3459665c66026977c9e0569b8
refs/heads/master: 6b57c11601c8fa4bfa046513c4df155b3b58ea89
12 changes: 3 additions & 9 deletions trunk/drivers/mtd/onenand/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ struct s3c_onenand {
struct resource *dma_res;
unsigned long phys_base;
struct completion complete;
#ifdef CONFIG_MTD_PARTITIONS
struct mtd_partition *parts;
#endif
};

#define CMD_MAP_00(dev, addr) (dev->cmd_map(MAP_00, ((addr) << 1)))
Expand All @@ -159,9 +157,7 @@ struct s3c_onenand {

static struct s3c_onenand *onenand;

#ifdef CONFIG_MTD_PARTITIONS
static const char *part_probes[] = { "cmdlinepart", NULL, };
#endif

static inline int s3c_read_reg(int offset)
{
Expand Down Expand Up @@ -1021,15 +1017,13 @@ static int s3c_onenand_probe(struct platform_device *pdev)
if (s3c_read_reg(MEM_CFG_OFFSET) & ONENAND_SYS_CFG1_SYNC_READ)
dev_info(&onenand->pdev->dev, "OneNAND Sync. Burst Read enabled\n");

#ifdef CONFIG_MTD_PARTITIONS
err = parse_mtd_partitions(mtd, part_probes, &onenand->parts, 0);
if (err > 0)
add_mtd_partitions(mtd, onenand->parts, err);
mtd_device_register(mtd, onenand->parts, err);
else if (err <= 0 && pdata && pdata->parts)
add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
mtd_device_register(mtd, pdata->parts, pdata->nr_parts);
else
#endif
err = add_mtd_device(mtd);
err = mtd_device_register(mtd, NULL, 0);

platform_set_drvdata(pdev, mtd);

Expand Down

0 comments on commit ac38c67

Please sign in to comment.