Repository navigation
Commit bcc678c
Boris Brezillon
mtd: nand: Do not expose the NAND manufacturer table directly
There is no reason to expose the NAND manufacturer table. Provide an
helper function to find manufacturers by their id.
We also turn the nand_manufacturers table into a const array, since its
members are not modified after the initial assignment.
Finally, we remove the sentinel manufacturer entry from the manufacturers
table (we already have the array size information given by ARRAY_SIZE()),
and add the nand_manufacturer_name() helper to handle the "Unknown" case
properly.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>1 parent f16bd7c commit bcc678c
3 files changed
Lines changed: 39 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4052 | 4052 | | |
4053 | 4053 | | |
4054 | 4054 | | |
| 4055 | + | |
4055 | 4056 | | |
4056 | 4057 | | |
4057 | | - | |
| 4058 | + | |
4058 | 4059 | | |
4059 | 4060 | | |
4060 | 4061 | | |
| |||
4159 | 4160 | | |
4160 | 4161 | | |
4161 | 4162 | | |
4162 | | - | |
4163 | | - | |
4164 | | - | |
4165 | | - | |
| 4163 | + | |
4166 | 4164 | | |
4167 | 4165 | | |
4168 | 4166 | | |
| |||
4174 | 4172 | | |
4175 | 4173 | | |
4176 | 4174 | | |
4177 | | - | |
| 4175 | + | |
| 4176 | + | |
4178 | 4177 | | |
4179 | 4178 | | |
4180 | 4179 | | |
| |||
4207 | 4206 | | |
4208 | 4207 | | |
4209 | 4208 | | |
4210 | | - | |
4211 | | - | |
| 4209 | + | |
| 4210 | + | |
4212 | 4211 | | |
4213 | | - | |
4214 | | - | |
| 4212 | + | |
| 4213 | + | |
4215 | 4214 | | |
4216 | | - | |
4217 | | - | |
| 4215 | + | |
| 4216 | + | |
4218 | 4217 | | |
4219 | 4218 | | |
4220 | 4219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
1074 | 1082 | | |
1075 | | - | |
1076 | 1083 | | |
1077 | 1084 | | |
1078 | 1085 | | |
| |||
0 commit comments