OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 2 Rev 3
1 --- a/arch/mips/bcm63xx/boards/board_common.c 1 --- a/arch/mips/bcm63xx/boards/board_common.c
2 +++ b/arch/mips/bcm63xx/boards/board_common.c 2 +++ b/arch/mips/bcm63xx/boards/board_common.c
3 @@ -143,6 +143,18 @@ void __init device_tree_init(void) 3 @@ -144,6 +144,18 @@ void __init device_tree_init(void)
4 4
5 unflatten_and_copy_device_tree(); 5 unflatten_and_copy_device_tree();
6 } 6 }
7 + 7 +
8 +int board_of_device_present(const char *alias) 8 +int board_of_device_present(const char *alias)
9 +{ 9 +{
10 + bool present; 10 + bool present;
11 + struct device_node *np; 11 + struct device_node *np;
12 + 12 +
13 + np = of_find_node_by_path(alias); 13 + np = of_find_node_by_path(alias);
14 + present = of_device_is_available(np); 14 + present = of_device_is_available(np);
15 + of_node_put(np); 15 + of_node_put(np);
16 + 16 +
17 + return present; 17 + return present;
18 +} 18 +}
19 #endif 19 #endif
20 20
21 static struct gpio_led_platform_data bcm63xx_led_data; 21 static struct gpio_led_platform_data bcm63xx_led_data;
22 --- a/arch/mips/bcm63xx/boards/board_common.h 22 --- a/arch/mips/bcm63xx/boards/board_common.h
23 +++ b/arch/mips/bcm63xx/boards/board_common.h 23 +++ b/arch/mips/bcm63xx/boards/board_common.h
24 @@ -15,4 +15,13 @@ void board_bcm963xx_init(void); 24 @@ -15,4 +15,13 @@ void board_bcm963xx_init(void);
25 static inline void board_bcm963xx_init(void) { } 25 static inline void board_bcm963xx_init(void) { }
26 #endif 26 #endif
27 27
28 +#if defined(CONFIG_OF) 28 +#if defined(CONFIG_OF)
29 +int board_of_device_present(const char *alias); 29 +int board_of_device_present(const char *alias);
30 +#else 30 +#else
31 +static inline void board_of_device_present(const char *alias) 31 +static inline void board_of_device_present(const char *alias)
32 +{ 32 +{
33 + return 0; 33 + return 0;
34 +} 34 +}
35 +#endif 35 +#endif
36 + 36 +
37 #endif /* __BOARD_COMMON_H */ 37 #endif /* __BOARD_COMMON_H */
38   38