File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
drivers/mtd/nand/raw/brcmnand Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -625,7 +625,7 @@ enum {
625
625
/* Only for v7.2 */
626
626
#define ACC_CONTROL_ECC_EXT_SHIFT 13
627
627
628
- static u8 brcmnand_status (struct brcmnand_host * host );
628
+ static int brcmnand_status (struct brcmnand_host * host );
629
629
630
630
static inline bool brcmnand_non_mmio_ops (struct brcmnand_controller * ctrl )
631
631
{
@@ -1690,7 +1690,7 @@ static int brcmnand_waitfunc(struct nand_chip *chip)
1690
1690
INTFC_FLASH_STATUS ;
1691
1691
}
1692
1692
1693
- static u8 brcmnand_status (struct brcmnand_host * host )
1693
+ static int brcmnand_status (struct brcmnand_host * host )
1694
1694
{
1695
1695
struct nand_chip * chip = & host -> chip ;
1696
1696
struct mtd_info * mtd = nand_to_mtd (chip );
@@ -1701,7 +1701,7 @@ static u8 brcmnand_status(struct brcmnand_host *host)
1701
1701
return brcmnand_waitfunc (chip );
1702
1702
}
1703
1703
1704
- static u8 brcmnand_reset (struct brcmnand_host * host )
1704
+ static int brcmnand_reset (struct brcmnand_host * host )
1705
1705
{
1706
1706
struct nand_chip * chip = & host -> chip ;
1707
1707
@@ -2433,7 +2433,11 @@ static int brcmnand_exec_op(struct nand_chip *chip,
2433
2433
2434
2434
if (brcmnand_op_is_status (op )) {
2435
2435
status = op -> instrs [1 ].ctx .data .buf .in ;
2436
- * status = brcmnand_status (host );
2436
+ ret = brcmnand_status (host );
2437
+ if (ret < 0 )
2438
+ return ret ;
2439
+
2440
+ * status = ret & 0xFF ;
2437
2441
2438
2442
return 0 ;
2439
2443
}
You can’t perform that action at this time.
0 commit comments