msm: acpuclock-copper: Update use of regulator_get() for Krait core rails

Call regulator_get() with a device argument instead of NULL, and add
appropriate device-to-regulator mappings in the device tree and
board-copper-regulator.

This is necessary for regulator_get() to succeed when the real
regulator devices in the device tree are used instead of the stubs
currently in the board file.

Change-Id: I3697ed05e9ee3abd1521f58e3f883c00dd886f2f
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/acpuclock-krait.c b/arch/arm/mach-msm/acpuclock-krait.c
index 194d134..d747704 100644
--- a/arch/arm/mach-msm/acpuclock-krait.c
+++ b/arch/arm/mach-msm/acpuclock-krait.c
@@ -509,7 +509,8 @@
 }
 
 /* Voltage regulator initialization. */
-static void __init regulator_init(const struct acpu_level *lvl)
+static void __init regulator_init(struct device *dev,
+				  const struct acpu_level *lvl)
 {
 	int cpu, ret;
 	struct scalable *sc;
@@ -534,7 +535,7 @@
 				   sc->vreg[VREG_HFPLL_B].max_vdd, false);
 
 		/* Setup Krait CPU regulators and initial core voltage. */
-		sc->vreg[VREG_CORE].reg = regulator_get(NULL,
+		sc->vreg[VREG_CORE].reg = regulator_get(dev,
 					  sc->vreg[VREG_CORE].name);
 		if (IS_ERR(sc->vreg[VREG_CORE].reg)) {
 			dev_err(drv.dev, "regulator_get(%s) failed (%ld)\n",
@@ -770,7 +771,7 @@
 
 	max_acpu_level = select_freq_plan(params->pvs_acpu_freq_tbl,
 					  params->qfprom_phys_base);
-	regulator_init(max_acpu_level);
+	regulator_init(dev, max_acpu_level);
 	bus_init(params->bus_scale_data, max_acpu_level->l2_level->bw_level);
 	init_clock_sources(&drv.scalable[L2], &max_acpu_level->l2_level->speed);
 	for_each_online_cpu(cpu)