소스 검색

regulator: core: Use a bitfield for continuous_voltage_range

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>
Mark Brown 10 년 전
부모
커밋
de4a54c4df
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      include/linux/regulator/driver.h

+ 1 - 1
include/linux/regulator/driver.h

@@ -292,7 +292,7 @@ struct regulator_desc {
 			    const struct regulator_desc *,
 			    const struct regulator_desc *,
 			    struct regulator_config *);
 			    struct regulator_config *);
 	int id;
 	int id;
-	bool continuous_voltage_range;
+	unsigned int continuous_voltage_range:1;
 	unsigned n_voltages;
 	unsigned n_voltages;
 	const struct regulator_ops *ops;
 	const struct regulator_ops *ops;
 	int irq;
 	int irq;