Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314493

[PATCH 1/2] regulator: core: Use a bitfield for continuous_voltage_range

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 1/2] regulator: core: Use a bitfield for continuous_voltage_range
Date 2016-01-21 21:30 +0100
Message-ID <qTu1H-1V0-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 16ac9e108806..3ac0f306f033 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -281,7 +281,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;
-- 
2.7.0.rc3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] regulator: core: Use a bitfield for continuous_voltage_range Mark Brown <broonie@kernel.org> - 2016-01-21 21:30 +0100
  [PATCH 2/2] regulator: core: Provide per-regulator runtime PM support Mark Brown <broonie@kernel.org> - 2016-01-21 21:30 +0100
    Re: [PATCH 2/2] regulator: core: Provide per-regulator runtime PM  support kbuild test robot <lkp@intel.com> - 2016-01-21 23:00 +0100
  Re: [PATCH 1/2] regulator: core: Use a bitfield for  continuous_voltage_range Joe Perches <joe@perches.com> - 2016-01-22 20:20 +0100
    Re: [PATCH 1/2] regulator: core: Use a bitfield for  continuous_voltage_range Mark Brown <broonie@kernel.org> - 2016-01-22 22:40 +0100
      Re: [PATCH 1/2] regulator: core: Use a bitfield for  continuous_voltage_range Joe Perches <joe@perches.com> - 2016-01-22 22:50 +0100
        Re: [PATCH 1/2] regulator: core: Use a bitfield for  continuous_voltage_range Mark Brown <broonie@kernel.org> - 2016-01-23 16:20 +0100

csiph-web