]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/regulator/max14577.c
Merge remote-tracking branches 'regulator/topic/doc', 'regulator/topic/enable', ...
[linux-beck.git] / drivers / regulator / max14577.c
index b1078ba3f39381338f2691f7585961337cf536c1..ed60baaeceeca79cc9ba2b9c770973d5039da3fa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * max14577.c - Regulator driver for the Maxim 14577
  *
- * Copyright (C) 2013 Samsung Electronics
+ * Copyright (C) 2013,2014 Samsung Electronics
  * Krzysztof Kozlowski <k.kozlowski@samsung.com>
  *
  * This program is free software; you can redistribute it and/or modify
 #include <linux/mfd/max14577-private.h>
 #include <linux/regulator/of_regulator.h>
 
-struct max14577_regulator {
-       struct device *dev;
-       struct max14577 *max14577;
-       struct regulator_dev **regulators;
-};
-
 static int max14577_reg_is_enabled(struct regulator_dev *rdev)
 {
        int rid = rdev_get_id(rdev);
@@ -166,12 +160,14 @@ static int max14577_regulator_dt_parse_pdata(struct platform_device *pdev)
 
        ret = of_regulator_match(&pdev->dev, np, max14577_regulator_matches,
                        MAX14577_REG_MAX);
-       if (ret < 0) {
+       if (ret < 0)
                dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", ret);
-               return ret;
-       }
+       else
+               ret = 0;
 
-       return 0;
+       of_node_put(np);
+
+       return ret;
 }
 
 static inline struct regulator_init_data *match_init_data(int index)