aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/physmap_of.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/physmap_of.c')
-rw-r--r--drivers/mtd/maps/physmap_of.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 36dbcee1ac2..ba124baa646 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -143,7 +143,7 @@ static int of_flash_remove(struct of_device *dev)
143static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, 143static struct mtd_info * __devinit obsolete_probe(struct of_device *dev,
144 struct map_info *map) 144 struct map_info *map)
145{ 145{
146 struct device_node *dp = dev->node; 146 struct device_node *dp = dev->dev.of_node;
147 const char *of_probe; 147 const char *of_probe;
148 struct mtd_info *mtd; 148 struct mtd_info *mtd;
149 static const char *rom_probe_types[] 149 static const char *rom_probe_types[]
@@ -221,7 +221,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
221#ifdef CONFIG_MTD_PARTITIONS 221#ifdef CONFIG_MTD_PARTITIONS
222 const char **part_probe_types; 222 const char **part_probe_types;
223#endif 223#endif
224 struct device_node *dp = dev->node; 224 struct device_node *dp = dev->dev.of_node;
225 struct resource res; 225 struct resource res;
226 struct of_flash *info; 226 struct of_flash *info;
227 const char *probe_type = match->data; 227 const char *probe_type = match->data;
@@ -245,7 +245,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
245 p = of_get_property(dp, "reg", &count); 245 p = of_get_property(dp, "reg", &count);
246 if (count % reg_tuple_size != 0) { 246 if (count % reg_tuple_size != 0) {
247 dev_err(&dev->dev, "Malformed reg property on %s\n", 247 dev_err(&dev->dev, "Malformed reg property on %s\n",
248 dev->node->full_name); 248 dev->dev.of_node->full_name);
249 err = -EINVAL; 249 err = -EINVAL;
250 goto err_flash_remove; 250 goto err_flash_remove;
251 } 251 }
@@ -418,8 +418,11 @@ static struct of_device_id of_flash_match[] = {
418MODULE_DEVICE_TABLE(of, of_flash_match); 418MODULE_DEVICE_TABLE(of, of_flash_match);
419 419
420static struct of_platform_driver of_flash_driver = { 420static struct of_platform_driver of_flash_driver = {
421 .name = "of-flash", 421 .driver = {
422 .match_table = of_flash_match, 422 .name = "of-flash",
423 .owner = THIS_MODULE,
424 .of_match_table = of_flash_match,
425 },
423 .probe = of_flash_probe, 426 .probe = of_flash_probe,
424 .remove = of_flash_remove, 427 .remove = of_flash_remove,
425}; 428};