ARM: OMAP3+: SmartReflex: use voltage domain name in device attributes
[pandora-kernel.git] / arch / arm / mach-omap2 / sr_device.c
index 9f43fcc..6029337 100644 (file)
@@ -74,6 +74,7 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user)
        struct omap_sr_data *sr_data;
        struct platform_device *pdev;
        struct omap_volt_data *volt_data;
+       struct omap_smartreflex_dev_attr *sr_dev_attr;
        char *name = "smartreflex";
        static int i;
 
@@ -84,9 +85,11 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user)
                return -ENOMEM;
        }
 
-       if (!oh->vdd_name) {
+       sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr;
+       if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) {
                pr_err("%s: No voltage domain specified for %s."
-                       "Cannot initialize\n", __func__, oh->name);
+                               "Cannot initialize\n", __func__,
+                                       oh->name);
                goto exit;
        }
 
@@ -94,10 +97,10 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user)
        sr_data->senn_mod = 0x1;
        sr_data->senp_mod = 0x1;
 
-       sr_data->voltdm = voltdm_lookup(oh->vdd_name);
+       sr_data->voltdm = voltdm_lookup(sr_dev_attr->sensor_voltdm_name);
        if (IS_ERR(sr_data->voltdm)) {
                pr_err("%s: Unable to get voltage domain pointer for VDD %s\n",
-                       __func__, oh->vdd_name);
+                       __func__, sr_dev_attr->sensor_voltdm_name);
                goto exit;
        }