Changeset 625 for GPL/branches/uniaud32-next/lib32/regcache-flat.c
- Timestamp:
- Jan 3, 2021, 7:20:20 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/lib32/regcache-flat.c
r615 r625 10 10 * published by the Free Software Foundation. 11 11 */ 12 /* from 4.1 4.202*/12 /* from 4.19.163 */ 13 13 14 14 #include <linux/device.h> 15 15 #include <linux/seq_file.h> 16 16 #include <linux/slab.h> 17 #include <linux/module.h>18 #include <linux/workqueue.h>19 #include <linux/byteorder/little_endian.h>20 #include <linux/printk.h>21 17 22 18 #include "internal.h" … … 43 39 cache = map->cache; 44 40 45 for (i = 0; i < map->num_reg_defaults; i++) 46 cache[regcache_flat_get_index(map, map->reg_defaults[i].reg)] = 47 map->reg_defaults[i].def; 41 for (i = 0; i < map->num_reg_defaults; i++) { 42 unsigned int reg = map->reg_defaults[i].reg; 43 unsigned int index = regcache_flat_get_index(map, reg); 44 45 cache[index] = map->reg_defaults[i].def; 46 } 48 47 49 48 return 0; … … 62 61 { 63 62 unsigned int *cache = map->cache; 63 unsigned int index = regcache_flat_get_index(map, reg); 64 64 65 *value = cache[ regcache_flat_get_index(map, reg)];65 *value = cache[index]; 66 66 67 67 return 0; … … 72 72 { 73 73 unsigned int *cache = map->cache; 74 unsigned int index = regcache_flat_get_index(map, reg); 74 75 75 cache[ regcache_flat_get_index(map, reg)] = value;76 cache[index] = value; 76 77 77 78 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.