The library doesn't necessarily depend on OF. This codepath is used by
both soc (OF only) and pci (no such requirement). After this, the only
of specific function is of_get_mac_address, which is needed for nvmem.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Link: https://patch.msgid.link/20260223214004.19960-1-rosenp@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
int rt2800_read_eeprom_nvmem(struct rt2x00_dev *rt2x00dev)
{
- struct device_node *np = rt2x00dev->dev->of_node;
+ struct device *dev = rt2x00dev->dev;
unsigned int len = rt2x00dev->ops->eeprom_size;
struct nvmem_cell *cell;
const void *data;
size_t retlen;
- cell = of_nvmem_cell_get(np, "eeprom");
+ cell = nvmem_cell_get(dev, "eeprom");
if (IS_ERR(cell))
return PTR_ERR(cell);