# Devices
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -56,9 +56,6 @@ static LIST_HEAD(nvmem_lookup_list);
+@@ -55,9 +55,6 @@ static LIST_HEAD(nvmem_lookup_list);
static BLOCKING_NOTIFIER_HEAD(nvmem_notifier);
static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset,
void *val, size_t bytes)
{
-@@ -741,97 +738,22 @@ static int nvmem_add_cells_from_fixed_la
+@@ -740,97 +737,22 @@ static int nvmem_add_cells_from_fixed_la
return err;
}
const void *nvmem_layout_get_match_data(struct nvmem_device *nvmem,
struct nvmem_layout *layout)
{
-@@ -839,7 +761,7 @@ const void *nvmem_layout_get_match_data(
+@@ -838,7 +760,7 @@ const void *nvmem_layout_get_match_data(
const struct of_device_id *match;
layout_np = of_nvmem_layout_get_container(nvmem);
return match ? match->data : NULL;
}
-@@ -951,19 +873,6 @@ struct nvmem_device *nvmem_register(cons
+@@ -950,19 +872,6 @@ struct nvmem_device *nvmem_register(cons
goto err_put_device;
}
if (config->cells) {
rval = nvmem_add_cells(nvmem, config->cells, config->ncells);
if (rval)
-@@ -984,24 +893,24 @@ struct nvmem_device *nvmem_register(cons
+@@ -983,24 +892,24 @@ struct nvmem_device *nvmem_register(cons
if (rval)
goto err_remove_cells;
if (config->compat)
nvmem_sysfs_remove_compat(nvmem, config);
err_put_device:
-@@ -1023,7 +932,7 @@ static void nvmem_device_release(struct
+@@ -1022,7 +931,7 @@ static void nvmem_device_release(struct
device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom);
nvmem_device_remove_all_cells(nvmem);
device_unregister(&nvmem->dev);
}
-@@ -1325,6 +1234,12 @@ nvmem_cell_get_from_lookup(struct device
+@@ -1324,6 +1233,12 @@ nvmem_cell_get_from_lookup(struct device
return cell;
}
#if IS_ENABLED(CONFIG_OF)
static struct nvmem_cell_entry *
nvmem_find_cell_entry_by_node(struct nvmem_device *nvmem, struct device_node *np)
-@@ -1343,6 +1258,18 @@ nvmem_find_cell_entry_by_node(struct nvm
+@@ -1342,6 +1257,18 @@ nvmem_find_cell_entry_by_node(struct nvm
return cell;
}
/**
* of_nvmem_cell_get() - Get a nvmem cell from given device node and cell id
*
-@@ -1405,16 +1332,29 @@ struct nvmem_cell *of_nvmem_cell_get(str
+@@ -1404,16 +1331,29 @@ struct nvmem_cell *of_nvmem_cell_get(str
return ERR_CAST(nvmem);
}
return cell;
}
-@@ -1528,6 +1468,7 @@ void nvmem_cell_put(struct nvmem_cell *c
+@@ -1527,6 +1467,7 @@ void nvmem_cell_put(struct nvmem_cell *c
kfree(cell);
__nvmem_device_put(nvmem);
}
EXPORT_SYMBOL_GPL(nvmem_cell_put);
-@@ -2105,11 +2046,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name);
+@@ -2104,11 +2045,22 @@ EXPORT_SYMBOL_GPL(nvmem_dev_name);
static int __init nvmem_init(void)
{