--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
-@@ -300,6 +300,43 @@ static umode_t nvmem_bin_attr_is_visible
+@@ -299,6 +299,43 @@ static umode_t nvmem_bin_attr_is_visible
return nvmem_bin_attr_get_umode(nvmem);
}
/* default read/write permissions */
static struct bin_attribute bin_attr_rw_nvmem = {
.attr = {
-@@ -321,11 +358,21 @@ static const struct attribute_group nvme
+@@ -320,11 +357,21 @@ static const struct attribute_group nvme
.is_bin_visible = nvmem_bin_attr_is_visible,
};
static struct bin_attribute bin_attr_nvmem_eeprom_compat = {
.attr = {
.name = "eeprom",
-@@ -381,6 +428,68 @@ static void nvmem_sysfs_remove_compat(st
+@@ -380,6 +427,68 @@ static void nvmem_sysfs_remove_compat(st
device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom);
}
#else /* CONFIG_NVMEM_SYSFS */
static int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem,
-@@ -740,11 +849,25 @@ static int nvmem_add_cells_from_fixed_la
+@@ -739,11 +848,25 @@ static int nvmem_add_cells_from_fixed_la
int nvmem_layout_register(struct nvmem_layout *layout)
{
}
EXPORT_SYMBOL_GPL(nvmem_layout_register);
-@@ -903,10 +1026,20 @@ struct nvmem_device *nvmem_register(cons
+@@ -902,10 +1025,20 @@ struct nvmem_device *nvmem_register(cons
if (rval)
goto err_remove_dev;