mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
of: add 'const' for of_parse_phandle parameter *np
The existing function does not change the passed device_node pointer. It is only handed to of_get_property which itself takes a const struct device_node. of_parse_phandle() can therefore take a const pointer as well. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> [grant.likely: drop extraneous whitespace change] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
4a92a385f8
commit
b8fbdc42c5
2 changed files with 4 additions and 4 deletions
|
@ -270,7 +270,7 @@ extern int of_n_size_cells(struct device_node *np);
|
|||
extern const struct of_device_id *of_match_node(
|
||||
const struct of_device_id *matches, const struct device_node *node);
|
||||
extern int of_modalias_node(struct device_node *node, char *modalias, int len);
|
||||
extern struct device_node *of_parse_phandle(struct device_node *np,
|
||||
extern struct device_node *of_parse_phandle(const struct device_node *np,
|
||||
const char *phandle_name,
|
||||
int index);
|
||||
extern int of_parse_phandle_with_args(struct device_node *np,
|
||||
|
@ -438,7 +438,7 @@ static inline int of_property_match_string(struct device_node *np,
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline struct device_node *of_parse_phandle(struct device_node *np,
|
||||
static inline struct device_node *of_parse_phandle(const struct device_node *np,
|
||||
const char *phandle_name,
|
||||
int index)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue