git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[sfrench/cifs-2.6.git]
/
drivers
/
platform
/
x86
/
intel_menlow.c
diff --git
a/drivers/platform/x86/intel_menlow.c
b/drivers/platform/x86/intel_menlow.c
index 27b7662955bb1659e60415e5b498d7f86af07179..29432a50be45373cfcdc12f1c8368f965bd14024 100644
(file)
--- a/
drivers/platform/x86/intel_menlow.c
+++ b/
drivers/platform/x86/intel_menlow.c
@@
-57,8
+57,8
@@
MODULE_LICENSE("GPL");
* In that case max_cstate would be n-1
* GTHS returning '0' would mean that no bandwidth control states are supported
*/
* In that case max_cstate would be n-1
* GTHS returning '0' would mean that no bandwidth control states are supported
*/
-static int memory_get_
int_
max_bandwidth(struct thermal_cooling_device *cdev,
-
unsigned long *max_state)
+static int memory_get_max_bandwidth(struct thermal_cooling_device *cdev,
+ unsigned long *max_state)
{
struct acpi_device *device = cdev->devdata;
acpi_handle handle = device->handle;
{
struct acpi_device *device = cdev->devdata;
acpi_handle handle = device->handle;
@@
-83,22
+83,12
@@
static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev,
return 0;
}
return 0;
}
-static int memory_get_max_bandwidth(struct thermal_cooling_device *cdev,
- char *buf)
-{
- unsigned long value;
- if (memory_get_int_max_bandwidth(cdev, &value))
- return -EINVAL;
-
- return sprintf(buf, "%ld\n", value);
-}
-
static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev,
static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev,
-
char *buf
)
+
unsigned long *value
)
{
struct acpi_device *device = cdev->devdata;
acpi_handle handle = device->handle;
{
struct acpi_device *device = cdev->devdata;
acpi_handle handle = device->handle;
- unsigned long long
value
;
+ unsigned long long
result
;
struct acpi_object_list arg_list;
union acpi_object arg;
acpi_status status = AE_OK;
struct acpi_object_list arg_list;
union acpi_object arg;
acpi_status status = AE_OK;
@@
-108,15
+98,16
@@
static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev,
arg.type = ACPI_TYPE_INTEGER;
arg.integer.value = MEMORY_ARG_CUR_BANDWIDTH;
status = acpi_evaluate_integer(handle, MEMORY_GET_BANDWIDTH,
arg.type = ACPI_TYPE_INTEGER;
arg.integer.value = MEMORY_ARG_CUR_BANDWIDTH;
status = acpi_evaluate_integer(handle, MEMORY_GET_BANDWIDTH,
- &arg_list, &
value
);
+ &arg_list, &
result
);
if (ACPI_FAILURE(status))
return -EFAULT;
if (ACPI_FAILURE(status))
return -EFAULT;
- return sprintf(buf, "%llu\n", value);
+ *value = result;
+ return 0;
}
static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
}
static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
- unsigned
int
state)
+ unsigned
long
state)
{
struct acpi_device *device = cdev->devdata;
acpi_handle handle = device->handle;
{
struct acpi_device *device = cdev->devdata;
acpi_handle handle = device->handle;
@@
-126,7
+117,7
@@
static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
unsigned long long temp;
unsigned long max_state;
unsigned long long temp;
unsigned long max_state;
- if (memory_get_
int_
max_bandwidth(cdev, &max_state))
+ if (memory_get_max_bandwidth(cdev, &max_state))
return -EFAULT;
if (state > max_state)
return -EFAULT;
if (state > max_state)
@@
-142,7
+133,7
@@
static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
&temp);
printk(KERN_INFO
&temp);
printk(KERN_INFO
- "Bandwidth value was %d: status is %d\n", state, status);
+ "Bandwidth value was %
l
d: status is %d\n", state, status);
if (ACPI_FAILURE(status))
return -EFAULT;
if (ACPI_FAILURE(status))
return -EFAULT;