aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/intel_menlow.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/intel_menlow.c')
-rw-r--r--drivers/misc/intel_menlow.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c
index cd3ea7faa5b6..a78274385d54 100644
--- a/drivers/misc/intel_menlow.c
+++ b/drivers/misc/intel_menlow.c
@@ -57,7 +57,7 @@ static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev,
57{ 57{
58 struct acpi_device *device = cdev->devdata; 58 struct acpi_device *device = cdev->devdata;
59 acpi_handle handle = device->handle; 59 acpi_handle handle = device->handle;
60 unsigned long value; 60 unsigned long long value;
61 struct acpi_object_list arg_list; 61 struct acpi_object_list arg_list;
62 union acpi_object arg; 62 union acpi_object arg;
63 acpi_status status = AE_OK; 63 acpi_status status = AE_OK;
@@ -90,7 +90,7 @@ static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev,
90{ 90{
91 struct acpi_device *device = cdev->devdata; 91 struct acpi_device *device = cdev->devdata;
92 acpi_handle handle = device->handle; 92 acpi_handle handle = device->handle;
93 unsigned long value; 93 unsigned long long value;
94 struct acpi_object_list arg_list; 94 struct acpi_object_list arg_list;
95 union acpi_object arg; 95 union acpi_object arg;
96 acpi_status status = AE_OK; 96 acpi_status status = AE_OK;
@@ -115,7 +115,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
115 struct acpi_object_list arg_list; 115 struct acpi_object_list arg_list;
116 union acpi_object arg; 116 union acpi_object arg;
117 acpi_status status; 117 acpi_status status;
118 int temp; 118 unsigned long long temp;
119 unsigned long max_state; 119 unsigned long max_state;
120 120
121 if (memory_get_int_max_bandwidth(cdev, &max_state)) 121 if (memory_get_int_max_bandwidth(cdev, &max_state))
@@ -131,7 +131,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
131 131
132 status = 132 status =
133 acpi_evaluate_integer(handle, MEMORY_SET_BANDWIDTH, &arg_list, 133 acpi_evaluate_integer(handle, MEMORY_SET_BANDWIDTH, &arg_list,
134 (unsigned long *)&temp); 134 &temp);
135 135
136 printk(KERN_INFO 136 printk(KERN_INFO
137 "Bandwidth value was %d: status is %d\n", state, status); 137 "Bandwidth value was %d: status is %d\n", state, status);
@@ -252,7 +252,8 @@ static DEFINE_MUTEX(intel_menlow_attr_lock);
252 * @auxtype : AUX0/AUX1 252 * @auxtype : AUX0/AUX1
253 * @buf: syfs buffer 253 * @buf: syfs buffer
254 */ 254 */
255static int sensor_get_auxtrip(acpi_handle handle, int index, int *value) 255static int sensor_get_auxtrip(acpi_handle handle, int index,
256 unsigned long long *value)
256{ 257{
257 acpi_status status; 258 acpi_status status;
258 259
@@ -260,7 +261,7 @@ static int sensor_get_auxtrip(acpi_handle handle, int index, int *value)
260 return -EINVAL; 261 return -EINVAL;
261 262
262 status = acpi_evaluate_integer(handle, index ? GET_AUX1 : GET_AUX0, 263 status = acpi_evaluate_integer(handle, index ? GET_AUX1 : GET_AUX0,
263 NULL, (unsigned long *)value); 264 NULL, value);
264 if (ACPI_FAILURE(status)) 265 if (ACPI_FAILURE(status))
265 return -EIO; 266 return -EIO;
266 267
@@ -282,13 +283,13 @@ static int sensor_set_auxtrip(acpi_handle handle, int index, int value)
282 struct acpi_object_list args = { 283 struct acpi_object_list args = {
283 1, &arg 284 1, &arg
284 }; 285 };
285 int temp; 286 unsigned long long temp;
286 287
287 if (index != 0 && index != 1) 288 if (index != 0 && index != 1)
288 return -EINVAL; 289 return -EINVAL;
289 290
290 status = acpi_evaluate_integer(handle, index ? GET_AUX0 : GET_AUX1, 291 status = acpi_evaluate_integer(handle, index ? GET_AUX0 : GET_AUX1,
291 NULL, (unsigned long *)&temp); 292 NULL, &temp);
292 if (ACPI_FAILURE(status)) 293 if (ACPI_FAILURE(status))
293 return -EIO; 294 return -EIO;
294 if ((index && value < temp) || (!index && value > temp)) 295 if ((index && value < temp) || (!index && value > temp))
@@ -296,7 +297,7 @@ static int sensor_set_auxtrip(acpi_handle handle, int index, int value)
296 297
297 arg.integer.value = value; 298 arg.integer.value = value;
298 status = acpi_evaluate_integer(handle, index ? SET_AUX1 : SET_AUX0, 299 status = acpi_evaluate_integer(handle, index ? SET_AUX1 : SET_AUX0,
299 &args, (unsigned long *)&temp); 300 &args, &temp);
300 if (ACPI_FAILURE(status)) 301 if (ACPI_FAILURE(status))
301 return -EIO; 302 return -EIO;
302 303
@@ -312,7 +313,7 @@ static ssize_t aux0_show(struct device *dev,
312 struct device_attribute *dev_attr, char *buf) 313 struct device_attribute *dev_attr, char *buf)
313{ 314{
314 struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr); 315 struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
315 int value; 316 unsigned long long value;
316 int result; 317 int result;
317 318
318 result = sensor_get_auxtrip(attr->handle, 0, &value); 319 result = sensor_get_auxtrip(attr->handle, 0, &value);
@@ -324,7 +325,7 @@ static ssize_t aux1_show(struct device *dev,
324 struct device_attribute *dev_attr, char *buf) 325 struct device_attribute *dev_attr, char *buf)
325{ 326{
326 struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr); 327 struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
327 int value; 328 unsigned long long value;
328 int result; 329 int result;
329 330
330 result = sensor_get_auxtrip(attr->handle, 1, &value); 331 result = sensor_get_auxtrip(attr->handle, 1, &value);
@@ -376,7 +377,7 @@ static ssize_t bios_enabled_show(struct device *dev,
376 struct device_attribute *attr, char *buf) 377 struct device_attribute *attr, char *buf)
377{ 378{
378 acpi_status status; 379 acpi_status status;
379 unsigned long bios_enabled; 380 unsigned long long bios_enabled;
380 381
381 status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &bios_enabled); 382 status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &bios_enabled);
382 if (ACPI_FAILURE(status)) 383 if (ACPI_FAILURE(status))
@@ -492,7 +493,7 @@ static int __init intel_menlow_module_init(void)
492{ 493{
493 int result = -ENODEV; 494 int result = -ENODEV;
494 acpi_status status; 495 acpi_status status;
495 unsigned long enable; 496 unsigned long long enable;
496 497
497 if (acpi_disabled) 498 if (acpi_disabled)
498 return result; 499 return result;