Message ID | 52EA35F1.3020002@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c index 7e1cefc..41fb3b8 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -814,11 +814,16 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc, } else { ret = of_get_named_gpio(np, "rb-gpios", i); if (ret >= 0) { + tmp = ret; chip->sels[i].rb.type = RB_GPIO; chip->sels[i].rb.info.gpio = tmp; ret = devm_gpio_request(dev, tmp, "nand-rb"); if (ret) return ret; + + ret = gpio_direction_input(tmp); + if (ret) + return ret; } else {