aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/ndfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/ndfc.c')
-rw-r--r--drivers/mtd/nand/ndfc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index b983cae8c298..c0e05f5ff8a4 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -239,14 +239,14 @@ static int __devinit ndfc_probe(struct of_device *ofdev,
239 dev_set_drvdata(&ofdev->dev, ndfc); 239 dev_set_drvdata(&ofdev->dev, ndfc);
240 240
241 /* Read the reg property to get the chip select */ 241 /* Read the reg property to get the chip select */
242 reg = of_get_property(ofdev->node, "reg", &len); 242 reg = of_get_property(ofdev->dev.of_node, "reg", &len);
243 if (reg == NULL || len != 12) { 243 if (reg == NULL || len != 12) {
244 dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); 244 dev_err(&ofdev->dev, "unable read reg property (%d)\n", len);
245 return -ENOENT; 245 return -ENOENT;
246 } 246 }
247 ndfc->chip_select = reg[0]; 247 ndfc->chip_select = reg[0];
248 248
249 ndfc->ndfcbase = of_iomap(ofdev->node, 0); 249 ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0);
250 if (!ndfc->ndfcbase) { 250 if (!ndfc->ndfcbase) {
251 dev_err(&ofdev->dev, "failed to get memory\n"); 251 dev_err(&ofdev->dev, "failed to get memory\n");
252 return -EIO; 252 return -EIO;
@@ -255,20 +255,20 @@ static int __devinit ndfc_probe(struct of_device *ofdev,
255 ccr = NDFC_CCR_BS(ndfc->chip_select); 255 ccr = NDFC_CCR_BS(ndfc->chip_select);
256 256
257 /* It is ok if ccr does not exist - just default to 0 */ 257 /* It is ok if ccr does not exist - just default to 0 */
258 reg = of_get_property(ofdev->node, "ccr", NULL); 258 reg = of_get_property(ofdev->dev.of_node, "ccr", NULL);
259 if (reg) 259 if (reg)
260 ccr |= *reg; 260 ccr |= *reg;
261 261
262 out_be32(ndfc->ndfcbase + NDFC_CCR, ccr); 262 out_be32(ndfc->ndfcbase + NDFC_CCR, ccr);
263 263
264 /* Set the bank settings if given */ 264 /* Set the bank settings if given */
265 reg = of_get_property(ofdev->node, "bank-settings", NULL); 265 reg = of_get_property(ofdev->dev.of_node, "bank-settings", NULL);
266 if (reg) { 266 if (reg) {
267 int offset = NDFC_BCFG0 + (ndfc->chip_select << 2); 267 int offset = NDFC_BCFG0 + (ndfc->chip_select << 2);
268 out_be32(ndfc->ndfcbase + offset, *reg); 268 out_be32(ndfc->ndfcbase + offset, *reg);
269 } 269 }
270 270
271 err = ndfc_chip_init(ndfc, ofdev->node); 271 err = ndfc_chip_init(ndfc, ofdev->dev.of_node);
272 if (err) { 272 if (err) {
273 iounmap(ndfc->ndfcbase); 273 iounmap(ndfc->ndfcbase);
274 return err; 274 return err;