aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS1
-rw-r--r--drivers/input/serio/xilinx_ps2.c2
-rw-r--r--drivers/of/address.c2
-rw-r--r--drivers/of/base.c7
-rw-r--r--include/linux/of.h15
5 files changed, 16 insertions, 11 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index c9c6324a7a9f..0d2fcda465eb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4722,6 +4722,7 @@ S: Maintained
4722F: drivers/of 4722F: drivers/of
4723F: include/linux/of*.h 4723F: include/linux/of*.h
4724K: of_get_property 4724K: of_get_property
4725K: of_match_table
4725 4726
4726OPENRISC ARCHITECTURE 4727OPENRISC ARCHITECTURE
4727M: Jonas Bonn <jonas@southpole.se> 4728M: Jonas Bonn <jonas@southpole.se>
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
index 80baa53da5b1..d64c5a43aaad 100644
--- a/drivers/input/serio/xilinx_ps2.c
+++ b/drivers/input/serio/xilinx_ps2.c
@@ -23,7 +23,7 @@
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/list.h> 24#include <linux/list.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26#include <linux/of_address.h>
27#include <linux/of_device.h> 27#include <linux/of_device.h>
28#include <linux/of_platform.h> 28#include <linux/of_platform.h>
29 29
diff --git a/drivers/of/address.c b/drivers/of/address.c
index da1f4b9605df..72c33fbe451d 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -610,6 +610,6 @@ void __iomem *of_iomap(struct device_node *np, int index)
610 if (of_address_to_resource(np, index, &res)) 610 if (of_address_to_resource(np, index, &res))
611 return NULL; 611 return NULL;
612 612
613 return ioremap(res.start, 1 + res.end - res.start); 613 return ioremap(res.start, resource_size(&res));
614} 614}
615EXPORT_SYMBOL(of_iomap); 615EXPORT_SYMBOL(of_iomap);
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 02ed36719def..3ff22e32b602 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -610,8 +610,9 @@ EXPORT_SYMBOL(of_find_node_by_phandle);
610 * 610 *
611 * The out_value is modified only if a valid u32 value can be decoded. 611 * The out_value is modified only if a valid u32 value can be decoded.
612 */ 612 */
613int of_property_read_u32_array(const struct device_node *np, char *propname, 613int of_property_read_u32_array(const struct device_node *np,
614 u32 *out_values, size_t sz) 614 const char *propname, u32 *out_values,
615 size_t sz)
615{ 616{
616 struct property *prop = of_find_property(np, propname, NULL); 617 struct property *prop = of_find_property(np, propname, NULL);
617 const __be32 *val; 618 const __be32 *val;
@@ -645,7 +646,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u32_array);
645 * 646 *
646 * The out_string pointer is modified only if a valid string can be decoded. 647 * The out_string pointer is modified only if a valid string can be decoded.
647 */ 648 */
648int of_property_read_string(struct device_node *np, char *propname, 649int of_property_read_string(struct device_node *np, const char *propname,
649 const char **out_string) 650 const char **out_string)
650{ 651{
651 struct property *prop = of_find_property(np, propname, NULL); 652 struct property *prop = of_find_property(np, propname, NULL);
diff --git a/include/linux/of.h b/include/linux/of.h
index bd716f8908de..0085bb01c041 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -196,12 +196,13 @@ extern struct property *of_find_property(const struct device_node *np,
196 const char *name, 196 const char *name,
197 int *lenp); 197 int *lenp);
198extern int of_property_read_u32_array(const struct device_node *np, 198extern int of_property_read_u32_array(const struct device_node *np,
199 char *propname, 199 const char *propname,
200 u32 *out_values, 200 u32 *out_values,
201 size_t sz); 201 size_t sz);
202 202
203extern int of_property_read_string(struct device_node *np, char *propname, 203extern int of_property_read_string(struct device_node *np,
204 const char **out_string); 204 const char *propname,
205 const char **out_string);
205extern int of_device_is_compatible(const struct device_node *device, 206extern int of_device_is_compatible(const struct device_node *device,
206 const char *); 207 const char *);
207extern int of_device_is_available(const struct device_node *device); 208extern int of_device_is_available(const struct device_node *device);
@@ -242,13 +243,15 @@ static inline bool of_have_populated_dt(void)
242} 243}
243 244
244static inline int of_property_read_u32_array(const struct device_node *np, 245static inline int of_property_read_u32_array(const struct device_node *np,
245 char *propname, u32 *out_values, size_t sz) 246 const char *propname,
247 u32 *out_values, size_t sz)
246{ 248{
247 return -ENOSYS; 249 return -ENOSYS;
248} 250}
249 251
250static inline int of_property_read_string(struct device_node *np, 252static inline int of_property_read_string(struct device_node *np,
251 char *propname, const char **out_string) 253 const char *propname,
254 const char **out_string)
252{ 255{
253 return -ENOSYS; 256 return -ENOSYS;
254} 257}
@@ -256,7 +259,7 @@ static inline int of_property_read_string(struct device_node *np,
256#endif /* CONFIG_OF */ 259#endif /* CONFIG_OF */
257 260
258static inline int of_property_read_u32(const struct device_node *np, 261static inline int of_property_read_u32(const struct device_node *np,
259 char *propname, 262 const char *propname,
260 u32 *out_value) 263 u32 *out_value)
261{ 264{
262 return of_property_read_u32_array(np, propname, out_value, 1); 265 return of_property_read_u32_array(np, propname, out_value, 1);