|
@@ -206,7 +206,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
|
-@@ -1141,9 +1143,33 @@ struct nvmem_device *devm_nvmem_device_g
|
|
|
+@@ -1139,9 +1141,33 @@ struct nvmem_device *devm_nvmem_device_g
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(devm_nvmem_device_get);
|
|
|
|
|
@@ -240,7 +240,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
struct nvmem_cell *cell = ERR_PTR(-ENOENT);
|
|
|
struct nvmem_cell_lookup *lookup;
|
|
|
struct nvmem_device *nvmem;
|
|
|
-@@ -1168,11 +1194,15 @@ nvmem_cell_get_from_lookup(struct device
|
|
|
+@@ -1166,11 +1192,15 @@ nvmem_cell_get_from_lookup(struct device
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -259,7 +259,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
-@@ -1183,10 +1213,10 @@ nvmem_cell_get_from_lookup(struct device
|
|
|
+@@ -1181,10 +1211,10 @@ nvmem_cell_get_from_lookup(struct device
|
|
|
}
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_OF)
|
|
@@ -273,7 +273,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
|
|
|
mutex_lock(&nvmem_mutex);
|
|
|
list_for_each_entry(iter, &nvmem->cells, node) {
|
|
|
-@@ -1216,6 +1246,7 @@ struct nvmem_cell *of_nvmem_cell_get(str
|
|
|
+@@ -1214,6 +1244,7 @@ struct nvmem_cell *of_nvmem_cell_get(str
|
|
|
{
|
|
|
struct device_node *cell_np, *nvmem_np;
|
|
|
struct nvmem_device *nvmem;
|
|
@@ -281,7 +281,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
struct nvmem_cell *cell;
|
|
|
int index = 0;
|
|
|
|
|
|
-@@ -1236,12 +1267,16 @@ struct nvmem_cell *of_nvmem_cell_get(str
|
|
|
+@@ -1234,12 +1265,16 @@ struct nvmem_cell *of_nvmem_cell_get(str
|
|
|
if (IS_ERR(nvmem))
|
|
|
return ERR_CAST(nvmem);
|
|
|
|
|
@@ -300,7 +300,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
return cell;
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(of_nvmem_cell_get);
|
|
|
-@@ -1347,13 +1382,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put);
|
|
|
+@@ -1345,13 +1380,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put);
|
|
|
*/
|
|
|
void nvmem_cell_put(struct nvmem_cell *cell)
|
|
|
{
|
|
@@ -320,7 +320,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
{
|
|
|
u8 *p, *b;
|
|
|
int i, extra, bit_offset = cell->bit_offset;
|
|
|
-@@ -1387,8 +1426,8 @@ static void nvmem_shift_read_buffer_in_p
|
|
|
+@@ -1385,8 +1424,8 @@ static void nvmem_shift_read_buffer_in_p
|
|
|
}
|
|
|
|
|
|
static int __nvmem_cell_read(struct nvmem_device *nvmem,
|
|
@@ -331,7 +331,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
{
|
|
|
int rc;
|
|
|
|
|
|
-@@ -1419,18 +1458,18 @@ static int __nvmem_cell_read(struct nvme
|
|
|
+@@ -1417,18 +1456,18 @@ static int __nvmem_cell_read(struct nvme
|
|
|
*/
|
|
|
void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
|
|
|
{
|
|
@@ -353,7 +353,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
if (rc) {
|
|
|
kfree(buf);
|
|
|
return ERR_PTR(rc);
|
|
|
-@@ -1440,7 +1479,7 @@ void *nvmem_cell_read(struct nvmem_cell
|
|
|
+@@ -1438,7 +1477,7 @@ void *nvmem_cell_read(struct nvmem_cell
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(nvmem_cell_read);
|
|
|
|
|
@@ -362,7 +362,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
u8 *_buf, int len)
|
|
|
{
|
|
|
struct nvmem_device *nvmem = cell->nvmem;
|
|
|
-@@ -1493,16 +1532,7 @@ err:
|
|
|
+@@ -1491,16 +1530,7 @@ err:
|
|
|
return ERR_PTR(rc);
|
|
|
}
|
|
|
|
|
@@ -380,7 +380,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
{
|
|
|
struct nvmem_device *nvmem = cell->nvmem;
|
|
|
int rc;
|
|
|
-@@ -1528,6 +1558,21 @@ int nvmem_cell_write(struct nvmem_cell *
|
|
|
+@@ -1526,6 +1556,21 @@ int nvmem_cell_write(struct nvmem_cell *
|
|
|
|
|
|
return len;
|
|
|
}
|
|
@@ -402,7 +402,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
EXPORT_SYMBOL_GPL(nvmem_cell_write);
|
|
|
|
|
|
static int nvmem_cell_read_common(struct device *dev, const char *cell_id,
|
|
|
-@@ -1630,7 +1675,7 @@ static const void *nvmem_cell_read_varia
|
|
|
+@@ -1628,7 +1673,7 @@ static const void *nvmem_cell_read_varia
|
|
|
if (IS_ERR(cell))
|
|
|
return cell;
|
|
|
|
|
@@ -411,7 +411,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
buf = nvmem_cell_read(cell, len);
|
|
|
nvmem_cell_put(cell);
|
|
|
if (IS_ERR(buf))
|
|
|
-@@ -1726,18 +1771,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab
|
|
|
+@@ -1724,18 +1769,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab
|
|
|
ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
|
|
|
struct nvmem_cell_info *info, void *buf)
|
|
|
{
|
|
@@ -433,7 +433,7 @@ Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
|
if (rc)
|
|
|
return rc;
|
|
|
|
|
|
-@@ -1757,17 +1802,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read
|
|
|
+@@ -1755,17 +1800,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read
|
|
|
int nvmem_device_cell_write(struct nvmem_device *nvmem,
|
|
|
struct nvmem_cell_info *info, void *buf)
|
|
|
{
|