Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274861
b: refs/heads/master
c: 3a8fb12
h: refs/heads/master
i:
  274859: 3ff358a
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent c29fd8e commit cdc44fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 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: f8214b80dacbb4d009b2c8968fe52aafb6ed55d4
refs/heads/master: 3a8fb12ae9fdbb712f11f9c73e5d08dc34f82118
21 changes: 3 additions & 18 deletions trunk/drivers/mtd/devices/mtd_dataflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,6 @@ add_dataflash_otp(struct spi_device *spi, char *name,
struct flash_platform_data *pdata = spi->dev.platform_data;
char *otp_tag = "";
int err = 0;
struct mtd_partition *parts;
int nr_parts = 0;

priv = kzalloc(sizeof *priv, GFP_KERNEL);
if (!priv)
Expand Down Expand Up @@ -677,23 +675,10 @@ add_dataflash_otp(struct spi_device *spi, char *name,
pagesize, otp_tag);
dev_set_drvdata(&spi->dev, priv);

nr_parts = parse_mtd_partitions(device, NULL, &parts, 0);
err = mtd_device_parse_register(device, NULL, 0,
pdata ? pdata->parts : NULL,
pdata ? pdata->nr_parts : 0);

if (nr_parts <= 0 && pdata && pdata->parts) {
parts = pdata->parts;
nr_parts = pdata->nr_parts;
}

if (nr_parts > 0) {
priv->partitioned = 1;
err = mtd_device_register(device, parts, nr_parts);
goto out;
}

if (mtd_device_register(device, NULL, 0) == 1)
err = -ENODEV;

out:
if (!err)
return 0;

Expand Down

0 comments on commit cdc44fc

Please sign in to comment.