File tree Expand file tree Collapse file tree 2 files changed +0
-45
lines changed Expand file tree Collapse file tree 2 files changed +0
-45
lines changed Original file line number Diff line number Diff line change @@ -81,42 +81,3 @@ const void *of_get_mac_address(struct device_node *np)
81
81
return of_get_mac_addr (np , "address" );
82
82
}
83
83
EXPORT_SYMBOL (of_get_mac_address );
84
-
85
- /**
86
- * Obtain the MAC address from an nvmem provider named 'mac-address' through
87
- * device tree.
88
- * On success, copies the new address into memory pointed to by addr and
89
- * returns 0. Returns a negative error code otherwise.
90
- * @np: Device tree node containing the nvmem-cells phandle
91
- * @addr: Pointer to receive the MAC address using ether_addr_copy()
92
- */
93
- int of_get_nvmem_mac_address (struct device_node * np , void * addr )
94
- {
95
- struct nvmem_cell * cell ;
96
- const void * mac ;
97
- size_t len ;
98
- int ret ;
99
-
100
- cell = of_nvmem_cell_get (np , "mac-address" );
101
- if (IS_ERR (cell ))
102
- return PTR_ERR (cell );
103
-
104
- mac = nvmem_cell_read (cell , & len );
105
-
106
- nvmem_cell_put (cell );
107
-
108
- if (IS_ERR (mac ))
109
- return PTR_ERR (mac );
110
-
111
- if (len < ETH_ALEN || !is_valid_ether_addr (mac )) {
112
- ret = - EINVAL ;
113
- } else {
114
- ether_addr_copy (addr , mac );
115
- ret = 0 ;
116
- }
117
-
118
- kfree (mac );
119
-
120
- return ret ;
121
- }
122
- EXPORT_SYMBOL (of_get_nvmem_mac_address );
Original file line number Diff line number Diff line change 13
13
struct net_device ;
14
14
extern int of_get_phy_mode (struct device_node * np );
15
15
extern const void * of_get_mac_address (struct device_node * np );
16
- extern int of_get_nvmem_mac_address (struct device_node * np , void * addr );
17
16
extern struct net_device * of_find_net_device_by_node (struct device_node * np );
18
17
#else
19
18
static inline int of_get_phy_mode (struct device_node * np )
@@ -26,11 +25,6 @@ static inline const void *of_get_mac_address(struct device_node *np)
26
25
return NULL ;
27
26
}
28
27
29
- static inline int of_get_nvmem_mac_address (struct device_node * np , void * addr )
30
- {
31
- return - ENODEV ;
32
- }
33
-
34
28
static inline struct net_device * of_find_net_device_by_node (struct device_node * np )
35
29
{
36
30
return NULL ;
You can’t perform that action at this time.
0 commit comments