regulator: add initialization macro of regulator supply
authorroald <roald@sh-dt-4505.(none)>
Mon, 13 Jul 2009 09:25:21 +0000 (17:25 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 22 Sep 2009 12:32:37 +0000 (13:32 +0100)
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
include/linux/regulator/machine.h

index 73a88f6..99a4e2e 100644 (file)
@@ -141,6 +141,13 @@ struct regulator_consumer_supply {
        const char *supply;     /* consumer supply - e.g. "vcc" */
 };
 
+/* Initialize struct regulator_consumer_supply */
+#define REGULATOR_SUPPLY(_name, _dev_name)                     \
+{                                                              \
+       .supply         = _name,                                \
+       .dev_name       = _dev_name,                            \
+}
+
 /**
  * struct regulator_init_data - regulator platform initialisation data.
  *