diff options
| -rw-r--r-- | drivers/thermal/int340x_thermal/int3400_thermal.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c index e26b01c05e82..61ca7ce3624e 100644 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/int340x_thermal/int3400_thermal.c | |||
| @@ -48,8 +48,7 @@ static ssize_t available_uuids_show(struct device *dev, | |||
| 48 | struct device_attribute *attr, | 48 | struct device_attribute *attr, |
| 49 | char *buf) | 49 | char *buf) |
| 50 | { | 50 | { |
| 51 | struct platform_device *pdev = to_platform_device(dev); | 51 | struct int3400_thermal_priv *priv = dev_get_drvdata(dev); |
| 52 | struct int3400_thermal_priv *priv = platform_get_drvdata(pdev); | ||
| 53 | int i; | 52 | int i; |
| 54 | int length = 0; | 53 | int length = 0; |
| 55 | 54 | ||
| @@ -68,8 +67,7 @@ static ssize_t available_uuids_show(struct device *dev, | |||
| 68 | static ssize_t current_uuid_show(struct device *dev, | 67 | static ssize_t current_uuid_show(struct device *dev, |
| 69 | struct device_attribute *devattr, char *buf) | 68 | struct device_attribute *devattr, char *buf) |
| 70 | { | 69 | { |
| 71 | struct platform_device *pdev = to_platform_device(dev); | 70 | struct int3400_thermal_priv *priv = dev_get_drvdata(dev); |
| 72 | struct int3400_thermal_priv *priv = platform_get_drvdata(pdev); | ||
| 73 | 71 | ||
| 74 | if (priv->uuid_bitmap & (1 << priv->current_uuid_index)) | 72 | if (priv->uuid_bitmap & (1 << priv->current_uuid_index)) |
| 75 | return sprintf(buf, "%s\n", | 73 | return sprintf(buf, "%s\n", |
| @@ -82,8 +80,7 @@ static ssize_t current_uuid_store(struct device *dev, | |||
| 82 | struct device_attribute *attr, | 80 | struct device_attribute *attr, |
| 83 | const char *buf, size_t count) | 81 | const char *buf, size_t count) |
| 84 | { | 82 | { |
| 85 | struct platform_device *pdev = to_platform_device(dev); | 83 | struct int3400_thermal_priv *priv = dev_get_drvdata(dev); |
| 86 | struct int3400_thermal_priv *priv = platform_get_drvdata(pdev); | ||
| 87 | int i; | 84 | int i; |
| 88 | 85 | ||
| 89 | for (i = 0; i < INT3400_THERMAL_MAXIMUM_UUID; ++i) { | 86 | for (i = 0; i < INT3400_THERMAL_MAXIMUM_UUID; ++i) { |
