aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2017-07-18 17:43:14 -0400
committerArnd Bergmann <arnd@arndb.de>2017-08-16 15:37:00 -0400
commitdb749d17cb917c0506f62eb3006950e25acb737f (patch)
treeaeb03dc68771e5dad49606e316319276d742dffc /drivers/memory
parent37c342cba5ef1ccb51f88a4aa5c1e74f793750c7 (diff)
memory: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Roger Quadros <rogerq@ti.com> Cc: Nicolas Ferre <nicolas.ferre@microchip.com> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Tony Lindgren <tony@atomide.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/atmel-ebi.c17
-rw-r--r--drivers/memory/jz4780-nemc.c12
-rw-r--r--drivers/memory/mvebu-devbus.c12
-rw-r--r--drivers/memory/omap-gpmc.c16
4 files changed, 28 insertions, 29 deletions
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 99e644cda4d1..597282e35c69 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -156,8 +156,8 @@ static int atmel_ebi_xslate_smc_timings(struct atmel_ebi_dev *ebid,
156out: 156out:
157 if (ret) { 157 if (ret) {
158 dev_err(ebid->ebi->dev, 158 dev_err(ebid->ebi->dev,
159 "missing or invalid timings definition in %s", 159 "missing or invalid timings definition in %pOF",
160 np->full_name); 160 np);
161 return ret; 161 return ret;
162 } 162 }
163 163
@@ -267,8 +267,8 @@ static int atmel_ebi_xslate_smc_config(struct atmel_ebi_dev *ebid,
267 return -EINVAL; 267 return -EINVAL;
268 268
269 if ((ret > 0 && !required) || (!ret && required)) { 269 if ((ret > 0 && !required) || (!ret && required)) {
270 dev_err(ebid->ebi->dev, "missing atmel,smc- properties in %s", 270 dev_err(ebid->ebi->dev, "missing atmel,smc- properties in %pOF",
271 np->full_name); 271 np);
272 return -EINVAL; 272 return -EINVAL;
273 } 273 }
274 274
@@ -311,8 +311,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,
311 311
312 if (cs >= AT91_MATRIX_EBI_NUM_CS || 312 if (cs >= AT91_MATRIX_EBI_NUM_CS ||
313 !(ebi->caps->available_cs & BIT(cs))) { 313 !(ebi->caps->available_cs & BIT(cs))) {
314 dev_err(dev, "invalid reg property in %s\n", 314 dev_err(dev, "invalid reg property in %pOF\n", np);
315 np->full_name);
316 return -EINVAL; 315 return -EINVAL;
317 } 316 }
318 317
@@ -321,7 +320,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,
321 } 320 }
322 321
323 if (!numcs) { 322 if (!numcs) {
324 dev_err(dev, "invalid reg property in %s\n", np->full_name); 323 dev_err(dev, "invalid reg property in %pOF\n", np);
325 return -EINVAL; 324 return -EINVAL;
326 } 325 }
327 326
@@ -569,8 +568,8 @@ static int atmel_ebi_probe(struct platform_device *pdev)
569 568
570 ret = atmel_ebi_dev_setup(ebi, child, reg_cells); 569 ret = atmel_ebi_dev_setup(ebi, child, reg_cells);
571 if (ret) { 570 if (ret) {
572 dev_err(dev, "failed to configure EBI bus for %s, disabling the device", 571 dev_err(dev, "failed to configure EBI bus for %pOF, disabling the device",
573 child->full_name); 572 child);
574 573
575 ret = atmel_ebi_dev_disable(ebi, child); 574 ret = atmel_ebi_dev_disable(ebi, child);
576 if (ret) 575 if (ret)
diff --git a/drivers/memory/jz4780-nemc.c b/drivers/memory/jz4780-nemc.c
index 919d1925acb9..bcf06adefc96 100644
--- a/drivers/memory/jz4780-nemc.c
+++ b/drivers/memory/jz4780-nemc.c
@@ -322,8 +322,8 @@ static int jz4780_nemc_probe(struct platform_device *pdev)
322 bank = of_read_number(prop, 1); 322 bank = of_read_number(prop, 1);
323 if (bank < 1 || bank >= JZ4780_NEMC_NUM_BANKS) { 323 if (bank < 1 || bank >= JZ4780_NEMC_NUM_BANKS) {
324 dev_err(nemc->dev, 324 dev_err(nemc->dev,
325 "%s requests invalid bank %u\n", 325 "%pOF requests invalid bank %u\n",
326 child->full_name, bank); 326 child, bank);
327 327
328 /* Will continue the outer loop below. */ 328 /* Will continue the outer loop below. */
329 referenced = 0; 329 referenced = 0;
@@ -334,12 +334,12 @@ static int jz4780_nemc_probe(struct platform_device *pdev)
334 } 334 }
335 335
336 if (!referenced) { 336 if (!referenced) {
337 dev_err(nemc->dev, "%s has no addresses\n", 337 dev_err(nemc->dev, "%pOF has no addresses\n",
338 child->full_name); 338 child);
339 continue; 339 continue;
340 } else if (nemc->banks_present & referenced) { 340 } else if (nemc->banks_present & referenced) {
341 dev_err(nemc->dev, "%s conflicts with another node\n", 341 dev_err(nemc->dev, "%pOF conflicts with another node\n",
342 child->full_name); 342 child);
343 continue; 343 continue;
344 } 344 }
345 345
diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c
index 24852812fd44..981860879d02 100644
--- a/drivers/memory/mvebu-devbus.c
+++ b/drivers/memory/mvebu-devbus.c
@@ -105,8 +105,8 @@ static int get_timing_param_ps(struct devbus *devbus,
105 105
106 err = of_property_read_u32(node, name, &time_ps); 106 err = of_property_read_u32(node, name, &time_ps);
107 if (err < 0) { 107 if (err < 0) {
108 dev_err(devbus->dev, "%s has no '%s' property\n", 108 dev_err(devbus->dev, "%pOF has no '%s' property\n",
109 name, node->full_name); 109 node, name);
110 return err; 110 return err;
111 } 111 }
112 112
@@ -127,8 +127,8 @@ static int devbus_get_timing_params(struct devbus *devbus,
127 err = of_property_read_u32(node, "devbus,bus-width", &r->bus_width); 127 err = of_property_read_u32(node, "devbus,bus-width", &r->bus_width);
128 if (err < 0) { 128 if (err < 0) {
129 dev_err(devbus->dev, 129 dev_err(devbus->dev,
130 "%s has no 'devbus,bus-width' property\n", 130 "%pOF has no 'devbus,bus-width' property\n",
131 node->full_name); 131 node);
132 return err; 132 return err;
133 } 133 }
134 134
@@ -180,8 +180,8 @@ static int devbus_get_timing_params(struct devbus *devbus,
180 &w->sync_enable); 180 &w->sync_enable);
181 if (err < 0) { 181 if (err < 0) {
182 dev_err(devbus->dev, 182 dev_err(devbus->dev,
183 "%s has no 'devbus,sync-enable' property\n", 183 "%pOF has no 'devbus,sync-enable' property\n",
184 node->full_name); 184 node);
185 return err; 185 return err;
186 } 186 }
187 } 187 }
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index a80e17de906d..7059bbda2fac 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -1930,8 +1930,8 @@ static int gpmc_probe_onenand_child(struct platform_device *pdev,
1930 struct omap_onenand_platform_data *gpmc_onenand_data; 1930 struct omap_onenand_platform_data *gpmc_onenand_data;
1931 1931
1932 if (of_property_read_u32(child, "reg", &val) < 0) { 1932 if (of_property_read_u32(child, "reg", &val) < 0) {
1933 dev_err(&pdev->dev, "%s has no 'reg' property\n", 1933 dev_err(&pdev->dev, "%pOF has no 'reg' property\n",
1934 child->full_name); 1934 child);
1935 return -ENODEV; 1935 return -ENODEV;
1936 } 1936 }
1937 1937
@@ -1979,14 +1979,14 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
1979 struct gpmc_device *gpmc = platform_get_drvdata(pdev); 1979 struct gpmc_device *gpmc = platform_get_drvdata(pdev);
1980 1980
1981 if (of_property_read_u32(child, "reg", &cs) < 0) { 1981 if (of_property_read_u32(child, "reg", &cs) < 0) {
1982 dev_err(&pdev->dev, "%s has no 'reg' property\n", 1982 dev_err(&pdev->dev, "%pOF has no 'reg' property\n",
1983 child->full_name); 1983 child);
1984 return -ENODEV; 1984 return -ENODEV;
1985 } 1985 }
1986 1986
1987 if (of_address_to_resource(child, 0, &res) < 0) { 1987 if (of_address_to_resource(child, 0, &res) < 0) {
1988 dev_err(&pdev->dev, "%s has malformed 'reg' property\n", 1988 dev_err(&pdev->dev, "%pOF has malformed 'reg' property\n",
1989 child->full_name); 1989 child);
1990 return -ENODEV; 1990 return -ENODEV;
1991 } 1991 }
1992 1992
@@ -2084,8 +2084,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
2084 ret = of_property_read_u32(child, "bank-width", 2084 ret = of_property_read_u32(child, "bank-width",
2085 &gpmc_s.device_width); 2085 &gpmc_s.device_width);
2086 if (ret < 0) { 2086 if (ret < 0) {
2087 dev_err(&pdev->dev, "%s has no 'bank-width' property\n", 2087 dev_err(&pdev->dev, "%pOF has no 'bank-width' property\n",
2088 child->full_name); 2088 child);
2089 goto err; 2089 goto err;
2090 } 2090 }
2091 } 2091 }