瀏覽代碼

Merge tag 'regulator-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "Two driver fixes, one fixing the mapping of interrupts on da9055
  (which previously wouldn't have worked at all) and a fix for reference
  counting OF nodes in the max14577 driver"

* tag 'regulator-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: da9055: Remove use of regmap_irq_get_virq()
  regulator: max14577: Add missing of_node_put
Linus Torvalds 11 年之前
父節點
當前提交
9398a10cd9
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 3 1
      drivers/regulator/da9055-regulator.c
  2. 3 2
      drivers/regulator/max14577.c

+ 3 - 1
drivers/regulator/da9055-regulator.c

@@ -576,7 +576,9 @@ static int da9055_regulator_probe(struct platform_device *pdev)
 	/* Only LDO 5 and 6 has got the over current interrupt */
 	if (pdev->id == DA9055_ID_LDO5 || pdev->id ==  DA9055_ID_LDO6) {
 		irq = platform_get_irq_byname(pdev, "REGULATOR");
-		irq = regmap_irq_get_virq(da9055->irq_data, irq);
+		if (irq < 0)
+			return irq;
+
 		ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 						da9055_ldo5_6_oc_irq,
 						IRQF_TRIGGER_HIGH |

+ 3 - 2
drivers/regulator/max14577.c

@@ -168,10 +168,11 @@ static int max14577_regulator_dt_parse_pdata(struct platform_device *pdev)
 			MAX14577_REG_MAX);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", ret);
-		return ret;
 	}
 
-	return 0;
+	of_node_put(np);
+
+	return ret;
 }
 
 static inline struct regulator_init_data *match_init_data(int index)