diff options
author | Krzysztof Kozlowski <[email protected]> | 2014-02-28 11:01:50 +0100 |
---|---|---|
committer | Mark Brown <[email protected]> | 2014-03-03 10:08:55 +0800 |
commit | 3e80f95bfc5f490bda4785cb672490f7012a40d0 (patch) | |
tree | 07c2c244013ed9e2685153d4052f60a17d7cc33a /tools/perf/util/trace-event-scripting.c | |
parent | 219ef031de434591bb6c85d22701ce8b23c4b1a4 (diff) |
regulator: s2mps11: Copy supported regulators from initconst
Add __initconst to 'regulator_desc' array with supported regulators.
During probe choose how many and which regulators will be supported
according to device ID. Then copy the 'regulator_desc' array to
allocated memory so the regulator core can use it.
Additionally allocate array of of_regulator_match() dynamically (based
on number of regulators) instead of allocation on the stack.
This is needed for supporting different devices in s2mps11
driver and actually prepares the regulator driver for supporting the
S2MPS14 device.
Code for supporting the S2MPS14 device will add its own array of
'regulator_desc' (also marked as __initconst). This way memory footprint
of the driver will be reduced (approximately 'regulators_desc' array for
S2MPS11 occupies 5 kB on 32-bit ARM, for S2MPS14 will occupy 3 kB).
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Cc: Yadwinder Singh Brar <[email protected]>
Reviewed-by: Yadwinder Singh Brar <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions