core.c (79fbf0468b2a05a743d31794423925d229c0e9c2) | core.c (666d6a36234f3123e909165ac32ea692213f0155) |
---|---|
1/* 2 * nvmem framework core. 3 * 4 * Copyright (C) 2015 Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 5 * Copyright (C) 2013 Maxime Ripard <maxime.ripard@free-electrons.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 and --- 273 unchanged lines hidden (view full) --- 282 283 return to_nvmem_device(d); 284} 285 286static struct nvmem_cell *nvmem_find_cell(const char *cell_id) 287{ 288 struct nvmem_cell *p; 289 | 1/* 2 * nvmem framework core. 3 * 4 * Copyright (C) 2015 Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 5 * Copyright (C) 2013 Maxime Ripard <maxime.ripard@free-electrons.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 and --- 273 unchanged lines hidden (view full) --- 282 283 return to_nvmem_device(d); 284} 285 286static struct nvmem_cell *nvmem_find_cell(const char *cell_id) 287{ 288 struct nvmem_cell *p; 289 |
290 mutex_lock(&nvmem_cells_mutex); 291 |
|
290 list_for_each_entry(p, &nvmem_cells, node) | 292 list_for_each_entry(p, &nvmem_cells, node) |
291 if (p && !strcmp(p->name, cell_id)) | 293 if (p && !strcmp(p->name, cell_id)) { 294 mutex_unlock(&nvmem_cells_mutex); |
292 return p; | 295 return p; |
296 } |
|
293 | 297 |
298 mutex_unlock(&nvmem_cells_mutex); 299 |
|
294 return NULL; 295} 296 297static void nvmem_cell_drop(struct nvmem_cell *cell) 298{ 299 mutex_lock(&nvmem_cells_mutex); 300 list_del(&cell->node); 301 mutex_unlock(&nvmem_cells_mutex); --- 938 unchanged lines hidden --- | 300 return NULL; 301} 302 303static void nvmem_cell_drop(struct nvmem_cell *cell) 304{ 305 mutex_lock(&nvmem_cells_mutex); 306 list_del(&cell->node); 307 mutex_unlock(&nvmem_cells_mutex); --- 938 unchanged lines hidden --- |