diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
commit | 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 (patch) | |
tree | fa581f6dc1c0596391690d1f67eceef3af8246dc /drivers/mtd/devices/mtd_dataflash.c | |
parent | d4e493caf788ef44982e131ff9c786546904d934 (diff) |
Linux-libre 4.5-gnu
Diffstat (limited to 'drivers/mtd/devices/mtd_dataflash.c')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index e4a88715a..f9e9bd1cf 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -624,7 +624,6 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, { struct dataflash *priv; struct mtd_info *device; - struct mtd_part_parser_data ppdata; struct flash_platform_data *pdata = dev_get_platdata(&spi->dev); char *otp_tag = ""; int err = 0; @@ -656,6 +655,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, device->priv = priv; device->dev.parent = &spi->dev; + mtd_set_of_node(device, spi->dev.of_node); if (revision >= 'c') otp_tag = otp_setup(device, revision); @@ -665,8 +665,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, pagesize, otp_tag); spi_set_drvdata(spi, priv); - ppdata.of_node = spi->dev.of_node; - err = mtd_device_parse_register(device, NULL, &ppdata, + err = mtd_device_register(device, pdata ? pdata->parts : NULL, pdata ? pdata->nr_parts : 0); |