Repository navigation
Commit f8c12fe
regulator: Copy constraints from regulators when initialising them
Currently the regulator API uses the constraints structure passed in to
the core throughout the lifetime of the object. This means that it is not
possible to mark the constraints as __initdata so if the kernel supports
many boards the constraints for all of them are kept around throughout the
lifetime of the system, consuming memory needlessly. By copying constraints
that are actually used we allow the use of __initdata, saving memory when
multiple boards are supported.
This also means the constraints can be const.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>1 parent f4d6adf commit f8c12fe
2 files changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
816 | | - | |
| 816 | + | |
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
823 | 826 | | |
824 | 827 | | |
825 | 828 | | |
826 | | - | |
| 829 | + | |
827 | 830 | | |
828 | 831 | | |
829 | 832 | | |
830 | 833 | | |
831 | 834 | | |
832 | | - | |
| 835 | + | |
833 | 836 | | |
834 | 837 | | |
835 | 838 | | |
| |||
846 | 849 | | |
847 | 850 | | |
848 | 851 | | |
849 | | - | |
| 852 | + | |
850 | 853 | | |
851 | 854 | | |
852 | 855 | | |
| |||
857 | 860 | | |
858 | 861 | | |
859 | 862 | | |
860 | | - | |
| 863 | + | |
| 864 | + | |
861 | 865 | | |
862 | 866 | | |
863 | 867 | | |
| |||
2289 | 2293 | | |
2290 | 2294 | | |
2291 | 2295 | | |
2292 | | - | |
| 2296 | + | |
2293 | 2297 | | |
2294 | 2298 | | |
2295 | 2299 | | |
| |||
2444 | 2448 | | |
2445 | 2449 | | |
2446 | 2450 | | |
| 2451 | + | |
2447 | 2452 | | |
2448 | 2453 | | |
2449 | 2454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
0 commit comments