Commit a6b11f53 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6

* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6:
  MAINTAINERS: Add keyword match for of_match_table to device tree section
  of: constify property name parameters for helper functions
  input: xilinx_ps2: Add missing of_address.h header
  of: address: use resource_size helper
parents 73a9fe86 d945fa0d
...@@ -4722,6 +4722,7 @@ S: Maintained ...@@ -4722,6 +4722,7 @@ S: Maintained
F: drivers/of F: drivers/of
F: include/linux/of*.h F: include/linux/of*.h
K: of_get_property K: of_get_property
K: of_match_table
OPENRISC ARCHITECTURE OPENRISC ARCHITECTURE
M: Jonas Bonn <jonas@southpole.se> M: Jonas Bonn <jonas@southpole.se>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/of_address.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
......
...@@ -610,6 +610,6 @@ void __iomem *of_iomap(struct device_node *np, int index) ...@@ -610,6 +610,6 @@ void __iomem *of_iomap(struct device_node *np, int index)
if (of_address_to_resource(np, index, &res)) if (of_address_to_resource(np, index, &res))
return NULL; return NULL;
return ioremap(res.start, 1 + res.end - res.start); return ioremap(res.start, resource_size(&res));
} }
EXPORT_SYMBOL(of_iomap); EXPORT_SYMBOL(of_iomap);
...@@ -610,8 +610,9 @@ EXPORT_SYMBOL(of_find_node_by_phandle); ...@@ -610,8 +610,9 @@ EXPORT_SYMBOL(of_find_node_by_phandle);
* *
* The out_value is modified only if a valid u32 value can be decoded. * The out_value is modified only if a valid u32 value can be decoded.
*/ */
int of_property_read_u32_array(const struct device_node *np, char *propname, int of_property_read_u32_array(const struct device_node *np,
u32 *out_values, size_t sz) const char *propname, u32 *out_values,
size_t sz)
{ {
struct property *prop = of_find_property(np, propname, NULL); struct property *prop = of_find_property(np, propname, NULL);
const __be32 *val; const __be32 *val;
...@@ -645,7 +646,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u32_array); ...@@ -645,7 +646,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u32_array);
* *
* The out_string pointer is modified only if a valid string can be decoded. * The out_string pointer is modified only if a valid string can be decoded.
*/ */
int of_property_read_string(struct device_node *np, char *propname, int of_property_read_string(struct device_node *np, const char *propname,
const char **out_string) const char **out_string)
{ {
struct property *prop = of_find_property(np, propname, NULL); struct property *prop = of_find_property(np, propname, NULL);
......
...@@ -196,11 +196,12 @@ extern struct property *of_find_property(const struct device_node *np, ...@@ -196,11 +196,12 @@ extern struct property *of_find_property(const struct device_node *np,
const char *name, const char *name,
int *lenp); int *lenp);
extern int of_property_read_u32_array(const struct device_node *np, extern int of_property_read_u32_array(const struct device_node *np,
char *propname, const char *propname,
u32 *out_values, u32 *out_values,
size_t sz); size_t sz);
extern int of_property_read_string(struct device_node *np, char *propname, extern int of_property_read_string(struct device_node *np,
const char *propname,
const char **out_string); const char **out_string);
extern int of_device_is_compatible(const struct device_node *device, extern int of_device_is_compatible(const struct device_node *device,
const char *); const char *);
...@@ -242,13 +243,15 @@ static inline bool of_have_populated_dt(void) ...@@ -242,13 +243,15 @@ static inline bool of_have_populated_dt(void)
} }
static inline int of_property_read_u32_array(const struct device_node *np, static inline int of_property_read_u32_array(const struct device_node *np,
char *propname, u32 *out_values, size_t sz) const char *propname,
u32 *out_values, size_t sz)
{ {
return -ENOSYS; return -ENOSYS;
} }
static inline int of_property_read_string(struct device_node *np, static inline int of_property_read_string(struct device_node *np,
char *propname, const char **out_string) const char *propname,
const char **out_string)
{ {
return -ENOSYS; return -ENOSYS;
} }
...@@ -256,7 +259,7 @@ static inline int of_property_read_string(struct device_node *np, ...@@ -256,7 +259,7 @@ static inline int of_property_read_string(struct device_node *np,
#endif /* CONFIG_OF */ #endif /* CONFIG_OF */
static inline int of_property_read_u32(const struct device_node *np, static inline int of_property_read_u32(const struct device_node *np,
char *propname, const char *propname,
u32 *out_value) u32 *out_value)
{ {
return of_property_read_u32_array(np, propname, out_value, 1); return of_property_read_u32_array(np, propname, out_value, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment