Skip to content

Commit 9f8f16c

Browse files
committed
Merge tag 'mtd/for-4.19-rc2' of git://git.infradead.org/linux-mtd
Pull mtd fixes from Boris Brezillon: "Raw NAND fixes: - denali: Fix a regression caused by the nand_scan() rework - docg4: Fix a build error when gcc decides to not iniline some functions (can be reproduced with gcc 4.1.2): * tag 'mtd/for-4.19-rc2' of git://git.infradead.org/linux-mtd: mtd: rawnand: denali: do not pass zero maxchips to nand_scan() mtd: rawnand: docg4: Remove wrong __init annotations
2 parents 48f8e8e + 336d139 commit 9f8f16c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/mtd/nand/raw/denali.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,11 @@ int denali_init(struct denali_nand_info *denali)
13381338

13391339
denali_enable_irq(denali);
13401340
denali_reset_banks(denali);
1341+
if (!denali->max_banks) {
1342+
/* Error out earlier if no chip is found for some reasons. */
1343+
ret = -ENODEV;
1344+
goto disable_irq;
1345+
}
13411346

13421347
denali->active_bank = DENALI_INVALID_BANK;
13431348

drivers/mtd/nand/raw/docg4.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ static int docg4_resume(struct platform_device *pdev)
12181218
return 0;
12191219
}
12201220

1221-
static void __init init_mtd_structs(struct mtd_info *mtd)
1221+
static void init_mtd_structs(struct mtd_info *mtd)
12221222
{
12231223
/* initialize mtd and nand data structures */
12241224

@@ -1290,7 +1290,7 @@ static void __init init_mtd_structs(struct mtd_info *mtd)
12901290

12911291
}
12921292

1293-
static int __init read_id_reg(struct mtd_info *mtd)
1293+
static int read_id_reg(struct mtd_info *mtd)
12941294
{
12951295
struct nand_chip *nand = mtd_to_nand(mtd);
12961296
struct docg4_priv *doc = nand_get_controller_data(nand);

0 commit comments

Comments
 (0)