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 @@ -128,42 +128,3 @@ const void *of_get_mac_address(struct device_node *np)
128128 return of_get_mac_addr_nvmem (np );
129129}
130130EXPORT_SYMBOL (of_get_mac_address );
131-
132- /**
133- * Obtain the MAC address from an nvmem provider named 'mac-address' through
134- * device tree.
135- * On success, copies the new address into memory pointed to by addr and
136- * returns 0. Returns a negative error code otherwise.
137- * @np: Device tree node containing the nvmem-cells phandle
138- * @addr: Pointer to receive the MAC address using ether_addr_copy()
139- */
140- int of_get_nvmem_mac_address (struct device_node * np , void * addr )
141- {
142- struct nvmem_cell * cell ;
143- const void * mac ;
144- size_t len ;
145- int ret ;
146-
147- cell = of_nvmem_cell_get (np , "mac-address" );
148- if (IS_ERR (cell ))
149- return PTR_ERR (cell );
150-
151- mac = nvmem_cell_read (cell , & len );
152-
153- nvmem_cell_put (cell );
154-
155- if (IS_ERR (mac ))
156- return PTR_ERR (mac );
157-
158- if (len < ETH_ALEN || !is_valid_ether_addr (mac )) {
159- ret = - EINVAL ;
160- } else {
161- ether_addr_copy (addr , mac );
162- ret = 0 ;
163- }
164-
165- kfree (mac );
166-
167- return ret ;
168- }
169- EXPORT_SYMBOL (of_get_nvmem_mac_address );
Original file line number Diff line number Diff line change 1313struct net_device ;
1414extern int of_get_phy_mode (struct device_node * np );
1515extern const void * of_get_mac_address (struct device_node * np );
16- extern int of_get_nvmem_mac_address (struct device_node * np , void * addr );
1716extern struct net_device * of_find_net_device_by_node (struct device_node * np );
1817#else
1918static 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)
2625 return NULL ;
2726}
2827
29- static inline int of_get_nvmem_mac_address (struct device_node * np , void * addr )
30- {
31- return - ENODEV ;
32- }
33-
3428static inline struct net_device * of_find_net_device_by_node (struct device_node * np )
3529{
3630 return NULL ;
You can’t perform that action at this time.
0 commit comments