mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
wifi: rt2x00: use generic nvmem_cell_get
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>
This commit is contained in:
parent
e098c26b35
commit
5249fcc0ef
|
|
@ -10965,13 +10965,13 @@ EXPORT_SYMBOL_GPL(rt2800_read_eeprom_efuse);
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user