regulator: core: Use a bitfield for continuous_voltage_range
authorMark Brown <broonie@kernel.org>
Thu, 21 Jan 2016 20:19:41 +0000 (20:19 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 20 Apr 2016 16:38:52 +0000 (17:38 +0100)
Using a bitfield enables the compiler to lay out the structure more
efficiently when we have other boolean flags since multiple values can
be included in a single byte.

Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/regulator/driver.h

index cd271e89a7e61a3a4271b536767ae5c001bd53a6..9ac3f9879576afeccb8e9ea1547d2106432051cb 100644 (file)
@@ -292,7 +292,7 @@ struct regulator_desc {
                            const struct regulator_desc *,
                            struct regulator_config *);
        int id;
-       bool continuous_voltage_range;
+       unsigned int continuous_voltage_range:1;
        unsigned n_voltages;
        const struct regulator_ops *ops;
        int irq;