msm: vidc: Pass device pointers to regulator_get()

Passing a device pointer instead of NULL as the first argument
to regulator_get() allows the device to be taken into account
when finding a matching regulator.

Change-Id: I34917d18e1216be01c0cf8ccfd0b6038e5474ffd
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/devices-8064.c b/arch/arm/mach-msm/devices-8064.c
index f5ff636..705bdd4 100644
--- a/arch/arm/mach-msm/devices-8064.c
+++ b/arch/arm/mach-msm/devices-8064.c
@@ -1626,7 +1626,7 @@
 	FS_8X60(FS_VFE,    "fs_vfe",	NULL,	&vfe_fs_data),
 	FS_8X60(FS_VPE,    "fs_vpe",	NULL,	&vpe_fs_data),
 	FS_8X60(FS_GFX3D,  "vdd",	"kgsl-3d0.0",	&gfx3d_fs_data),
-	FS_8X60(FS_VED,    "fs_ved",	NULL,	&ved_fs_data),
+	FS_8X60(FS_VED,    "vdd",	"msm_vidc.0",	&ved_fs_data),
 	FS_8X60(FS_VCAP,   "fs_vcap",	NULL,	&vcap_fs_data),
 };
 unsigned apq8064_num_footswitch __initdata = ARRAY_SIZE(apq8064_footswitch);
diff --git a/arch/arm/mach-msm/devices-8930.c b/arch/arm/mach-msm/devices-8930.c
index 1e3406e..ec0e1b3 100644
--- a/arch/arm/mach-msm/devices-8930.c
+++ b/arch/arm/mach-msm/devices-8930.c
@@ -436,7 +436,7 @@
 	FS_8X60(FS_VFE,    "fs_vfe",	NULL,	&vfe_fs_data),
 	FS_8X60(FS_VPE,    "fs_vpe",	NULL,	&vpe_fs_data),
 	FS_8X60(FS_GFX3D,  "vdd",	"kgsl-3d0.0",	&gfx3d_fs_data),
-	FS_8X60(FS_VED,    "fs_ved",	NULL,	&ved_fs_data),
+	FS_8X60(FS_VED,    "vdd",	"msm_vidc.0",	&ved_fs_data),
 };
 unsigned msm8930_num_footswitch __initdata = ARRAY_SIZE(msm8930_footswitch);
 
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index 6f1fe37..0a9d108 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -2079,7 +2079,7 @@
 	FS_8X60(FS_GFX3D,  "vdd",	"kgsl-3d0.0",	&gfx3d_fs_data),
 	FS_8X60(FS_GFX2D0, "vdd",	"kgsl-2d0.0",	&gfx2d0_fs_data),
 	FS_8X60(FS_GFX2D1, "vdd",	"kgsl-2d1.1",	&gfx2d1_fs_data),
-	FS_8X60(FS_VED,    "fs_ved",	NULL,	&ved_fs_data),
+	FS_8X60(FS_VED,    "vdd",	"msm_vidc.0",	&ved_fs_data),
 };
 unsigned msm8960_num_footswitch __initdata = ARRAY_SIZE(msm8960_footswitch);
 
diff --git a/arch/arm/mach-msm/devices-msm8x60.c b/arch/arm/mach-msm/devices-msm8x60.c
index 16ee017..1df4817 100644
--- a/arch/arm/mach-msm/devices-msm8x60.c
+++ b/arch/arm/mach-msm/devices-msm8x60.c
@@ -2660,7 +2660,7 @@
 	FS_8X60(FS_IJPEG,  "fs_ijpeg",	NULL,	&ijpeg_fs_data),
 	FS_8X60(FS_MDP,    "fs_mdp",	NULL,	&mdp_fs_data),
 	FS_8X60(FS_ROT,    "fs_rot",	NULL,	&rot_fs_data),
-	FS_8X60(FS_VED,    "fs_ved",	NULL,	&ved_fs_data),
+	FS_8X60(FS_VED,    "vdd",	"msm_vidc.0",	&ved_fs_data),
 	FS_8X60(FS_VFE,    "fs_vfe",	NULL,	&vfe_fs_data),
 	FS_8X60(FS_VPE,    "fs_vpe",	NULL,	&vpe_fs_data),
 	FS_8X60(FS_GFX3D,  "vdd",	"kgsl-3d0.0",	&gfx3d_fs_data),
diff --git a/drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c b/drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c
index 1c23da3..c056328 100644
--- a/drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c
+++ b/drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c
@@ -427,7 +427,8 @@
 		goto bail_out;
 	}
 	if (!resource_context.footswitch)
-		resource_context.footswitch = regulator_get(NULL, "fs_ved");
+		resource_context.footswitch =
+			regulator_get(resource_context.device, "vdd");
 	if (IS_ERR(resource_context.footswitch)) {
 		VCDRES_MSG_ERROR("foot switch get failed\n");
 		resource_context.footswitch = NULL;