diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/thermal/armada_thermal.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index 5e53212b984f..c5db07104354 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c | |||
| @@ -38,16 +38,16 @@ | |||
| 38 | #define PMU_TDC0_OTF_CAL_MASK (0x1 << 30) | 38 | #define PMU_TDC0_OTF_CAL_MASK (0x1 << 30) |
| 39 | #define PMU_TDC0_START_CAL_MASK (0x1 << 25) | 39 | #define PMU_TDC0_START_CAL_MASK (0x1 << 25) |
| 40 | 40 | ||
| 41 | struct armada_thermal_ops; | 41 | struct armada_thermal_data; |
| 42 | 42 | ||
| 43 | /* Marvell EBU Thermal Sensor Dev Structure */ | 43 | /* Marvell EBU Thermal Sensor Dev Structure */ |
| 44 | struct armada_thermal_priv { | 44 | struct armada_thermal_priv { |
| 45 | void __iomem *sensor; | 45 | void __iomem *sensor; |
| 46 | void __iomem *control; | 46 | void __iomem *control; |
| 47 | struct armada_thermal_ops *ops; | 47 | struct armada_thermal_data *data; |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | struct armada_thermal_ops { | 50 | struct armada_thermal_data { |
| 51 | /* Initialize the sensor */ | 51 | /* Initialize the sensor */ |
| 52 | void (*init_sensor)(struct armada_thermal_priv *); | 52 | void (*init_sensor)(struct armada_thermal_priv *); |
| 53 | 53 | ||
| @@ -113,7 +113,7 @@ static int armada_get_temp(struct thermal_zone_device *thermal, | |||
| 113 | unsigned long reg; | 113 | unsigned long reg; |
| 114 | 114 | ||
| 115 | /* Valid check */ | 115 | /* Valid check */ |
| 116 | if (priv->ops->is_valid && !priv->ops->is_valid(priv)) { | 116 | if (priv->data->is_valid && !priv->data->is_valid(priv)) { |
| 117 | dev_err(&thermal->device, | 117 | dev_err(&thermal->device, |
| 118 | "Temperature sensor reading not valid\n"); | 118 | "Temperature sensor reading not valid\n"); |
| 119 | return -EIO; | 119 | return -EIO; |
| @@ -129,11 +129,11 @@ static struct thermal_zone_device_ops ops = { | |||
| 129 | .get_temp = armada_get_temp, | 129 | .get_temp = armada_get_temp, |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | static const struct armada_thermal_ops armadaxp_ops = { | 132 | static const struct armada_thermal_data armadaxp_data = { |
| 133 | .init_sensor = armadaxp_init_sensor, | 133 | .init_sensor = armadaxp_init_sensor, |
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | static const struct armada_thermal_ops armada370_ops = { | 136 | static const struct armada_thermal_data armada370_data = { |
| 137 | .is_valid = armada_is_valid, | 137 | .is_valid = armada_is_valid, |
| 138 | .init_sensor = armada370_init_sensor, | 138 | .init_sensor = armada370_init_sensor, |
| 139 | }; | 139 | }; |
| @@ -141,11 +141,11 @@ static const struct armada_thermal_ops armada370_ops = { | |||
| 141 | static const struct of_device_id armada_thermal_id_table[] = { | 141 | static const struct of_device_id armada_thermal_id_table[] = { |
| 142 | { | 142 | { |
| 143 | .compatible = "marvell,armadaxp-thermal", | 143 | .compatible = "marvell,armadaxp-thermal", |
| 144 | .data = &armadaxp_ops, | 144 | .data = &armadaxp_data, |
| 145 | }, | 145 | }, |
| 146 | { | 146 | { |
| 147 | .compatible = "marvell,armada370-thermal", | 147 | .compatible = "marvell,armada370-thermal", |
| 148 | .data = &armada370_ops, | 148 | .data = &armada370_data, |
| 149 | }, | 149 | }, |
| 150 | { | 150 | { |
| 151 | /* sentinel */ | 151 | /* sentinel */ |
| @@ -178,8 +178,8 @@ static int armada_thermal_probe(struct platform_device *pdev) | |||
| 178 | if (IS_ERR(priv->control)) | 178 | if (IS_ERR(priv->control)) |
| 179 | return PTR_ERR(priv->control); | 179 | return PTR_ERR(priv->control); |
| 180 | 180 | ||
| 181 | priv->ops = (struct armada_thermal_ops *)match->data; | 181 | priv->data = (struct armada_thermal_data *)match->data; |
| 182 | priv->ops->init_sensor(priv); | 182 | priv->data->init_sensor(priv); |
| 183 | 183 | ||
| 184 | thermal = thermal_zone_device_register("armada_thermal", 0, 0, | 184 | thermal = thermal_zone_device_register("armada_thermal", 0, 0, |
| 185 | priv, &ops, NULL, 0, 0); | 185 | priv, &ops, NULL, 0, 0); |
