diff options
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 14 |
3 files changed, 10 insertions, 14 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 59ab0692f0b9..a9830ff8e3f3 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c | |||
@@ -349,7 +349,7 @@ static int legacy_set_geometry(struct gpmi_nand_data *this) | |||
349 | 349 | ||
350 | int common_nfc_set_geometry(struct gpmi_nand_data *this) | 350 | int common_nfc_set_geometry(struct gpmi_nand_data *this) |
351 | { | 351 | { |
352 | return set_geometry_by_ecc_info(this) ? 0 : legacy_set_geometry(this); | 352 | return legacy_set_geometry(this); |
353 | } | 353 | } |
354 | 354 | ||
355 | struct dma_chan *get_dma_chan(struct gpmi_nand_data *this) | 355 | struct dma_chan *get_dma_chan(struct gpmi_nand_data *this) |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 7ed4841327f2..d340b2f198c6 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -2869,10 +2869,8 @@ static int nand_flash_detect_ext_param_page(struct mtd_info *mtd, | |||
2869 | 2869 | ||
2870 | len = le16_to_cpu(p->ext_param_page_length) * 16; | 2870 | len = le16_to_cpu(p->ext_param_page_length) * 16; |
2871 | ep = kmalloc(len, GFP_KERNEL); | 2871 | ep = kmalloc(len, GFP_KERNEL); |
2872 | if (!ep) { | 2872 | if (!ep) |
2873 | ret = -ENOMEM; | 2873 | return -ENOMEM; |
2874 | goto ext_out; | ||
2875 | } | ||
2876 | 2874 | ||
2877 | /* Send our own NAND_CMD_PARAM. */ | 2875 | /* Send our own NAND_CMD_PARAM. */ |
2878 | chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1); | 2876 | chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1); |
@@ -2920,7 +2918,7 @@ static int nand_flash_detect_ext_param_page(struct mtd_info *mtd, | |||
2920 | } | 2918 | } |
2921 | 2919 | ||
2922 | pr_info("ONFI extended param page detected.\n"); | 2920 | pr_info("ONFI extended param page detected.\n"); |
2923 | return 0; | 2921 | ret = 0; |
2924 | 2922 | ||
2925 | ext_out: | 2923 | ext_out: |
2926 | kfree(ep); | 2924 | kfree(ep); |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 5db900d917f9..c28d4e29af1a 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -1236,7 +1236,6 @@ static int pxa3xx_nand_remove(struct platform_device *pdev) | |||
1236 | return 0; | 1236 | return 0; |
1237 | } | 1237 | } |
1238 | 1238 | ||
1239 | #ifdef CONFIG_OF | ||
1240 | static struct of_device_id pxa3xx_nand_dt_ids[] = { | 1239 | static struct of_device_id pxa3xx_nand_dt_ids[] = { |
1241 | { | 1240 | { |
1242 | .compatible = "marvell,pxa3xx-nand", | 1241 | .compatible = "marvell,pxa3xx-nand", |
@@ -1284,12 +1283,6 @@ static int pxa3xx_nand_probe_dt(struct platform_device *pdev) | |||
1284 | 1283 | ||
1285 | return 0; | 1284 | return 0; |
1286 | } | 1285 | } |
1287 | #else | ||
1288 | static inline int pxa3xx_nand_probe_dt(struct platform_device *pdev) | ||
1289 | { | ||
1290 | return 0; | ||
1291 | } | ||
1292 | #endif | ||
1293 | 1286 | ||
1294 | static int pxa3xx_nand_probe(struct platform_device *pdev) | 1287 | static int pxa3xx_nand_probe(struct platform_device *pdev) |
1295 | { | 1288 | { |
@@ -1327,7 +1320,12 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) | |||
1327 | for (cs = 0; cs < pdata->num_cs; cs++) { | 1320 | for (cs = 0; cs < pdata->num_cs; cs++) { |
1328 | struct mtd_info *mtd = info->host[cs]->mtd; | 1321 | struct mtd_info *mtd = info->host[cs]->mtd; |
1329 | 1322 | ||
1330 | mtd->name = pdev->name; | 1323 | /* |
1324 | * The mtd name matches the one used in 'mtdparts' kernel | ||
1325 | * parameter. This name cannot be changed or otherwise | ||
1326 | * user's mtd partitions configuration would get broken. | ||
1327 | */ | ||
1328 | mtd->name = "pxa3xx_nand-0"; | ||
1331 | info->cs = cs; | 1329 | info->cs = cs; |
1332 | ret = pxa3xx_nand_scan(mtd); | 1330 | ret = pxa3xx_nand_scan(mtd); |
1333 | if (ret) { | 1331 | if (ret) { |