浏览代码

regulator: pwm-regulator: Fix ' comparison between signed and unsigned integer' warning

drivers/regulator/pwm-regulator.c:
  In function ‘pwm_regulator_init_table’:
drivers/regulator/pwm-regulator.c:171:14:
  warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Lee Jones 10 年之前
父节点
当前提交
60cb65ebf4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/regulator/pwm-regulator.c

+ 1 - 1
drivers/regulator/pwm-regulator.c

@@ -163,7 +163,7 @@ static int pwm_regulator_init_table(struct platform_device *pdev,
 {
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device_node *np = pdev->dev.of_node;
 	struct pwm_voltages *duty_cycle_table;
 	struct pwm_voltages *duty_cycle_table;
-	int length = 0;
+	unsigned int length = 0;
 	int ret;
 	int ret;
 
 
 	of_find_property(np, "voltage-table", &length);
 	of_find_property(np, "voltage-table", &length);