diff options
Diffstat (limited to 'arch/arm/mach-omap2/sr_device.c')
-rw-r--r-- | arch/arm/mach-omap2/sr_device.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c index 9f43fcc05d3e..a503e1e8358c 100644 --- a/arch/arm/mach-omap2/sr_device.c +++ b/arch/arm/mach-omap2/sr_device.c | |||
@@ -69,11 +69,12 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data, | |||
69 | sr_data->nvalue_count = count; | 69 | sr_data->nvalue_count = count; |
70 | } | 70 | } |
71 | 71 | ||
72 | static int sr_dev_init(struct omap_hwmod *oh, void *user) | 72 | static int __init sr_dev_init(struct omap_hwmod *oh, void *user) |
73 | { | 73 | { |
74 | struct omap_sr_data *sr_data; | 74 | struct omap_sr_data *sr_data; |
75 | struct platform_device *pdev; | 75 | struct platform_device *pdev; |
76 | struct omap_volt_data *volt_data; | 76 | struct omap_volt_data *volt_data; |
77 | struct omap_smartreflex_dev_attr *sr_dev_attr; | ||
77 | char *name = "smartreflex"; | 78 | char *name = "smartreflex"; |
78 | static int i; | 79 | static int i; |
79 | 80 | ||
@@ -84,9 +85,11 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user) | |||
84 | return -ENOMEM; | 85 | return -ENOMEM; |
85 | } | 86 | } |
86 | 87 | ||
87 | if (!oh->vdd_name) { | 88 | sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr; |
89 | if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) { | ||
88 | pr_err("%s: No voltage domain specified for %s." | 90 | pr_err("%s: No voltage domain specified for %s." |
89 | "Cannot initialize\n", __func__, oh->name); | 91 | "Cannot initialize\n", __func__, |
92 | oh->name); | ||
90 | goto exit; | 93 | goto exit; |
91 | } | 94 | } |
92 | 95 | ||
@@ -94,10 +97,10 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user) | |||
94 | sr_data->senn_mod = 0x1; | 97 | sr_data->senn_mod = 0x1; |
95 | sr_data->senp_mod = 0x1; | 98 | sr_data->senp_mod = 0x1; |
96 | 99 | ||
97 | sr_data->voltdm = voltdm_lookup(oh->vdd_name); | 100 | sr_data->voltdm = voltdm_lookup(sr_dev_attr->sensor_voltdm_name); |
98 | if (IS_ERR(sr_data->voltdm)) { | 101 | if (IS_ERR(sr_data->voltdm)) { |
99 | pr_err("%s: Unable to get voltage domain pointer for VDD %s\n", | 102 | pr_err("%s: Unable to get voltage domain pointer for VDD %s\n", |
100 | __func__, oh->vdd_name); | 103 | __func__, sr_dev_attr->sensor_voltdm_name); |
101 | goto exit; | 104 | goto exit; |
102 | } | 105 | } |
103 | 106 | ||