Commit 1539af85 authored by Andy Grover's avatar Andy Grover

ACPI: Make proc write interfaces work (Pavel Machek)

parent 5e50cc1b
......@@ -794,7 +794,7 @@ acpi_processor_register_performance (
}
EXPORT_SYMBOL(acpi_processor_register_performance);
/* for the rest of it, check processor_perf.c */
/* for the rest of it, check cpufreq/acpi.c */
/* --------------------------------------------------------------------------
......@@ -1350,8 +1350,8 @@ static int
acpi_processor_write_throttling (
struct file *file,
const char *buffer,
unsigned long count,
void *data)
size_t count,
loff_t *data)
{
int result = 0;
struct acpi_processor *pr = (struct acpi_processor *) data;
......@@ -1410,10 +1410,10 @@ static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file)
static int
acpi_processor_write_limit (
struct file *file,
const char *buffer,
unsigned long count,
void *data)
struct file *file,
const char *buffer,
size_t count,
loff_t *data)
{
int result = 0;
struct acpi_processor *pr = (struct acpi_processor *) data;
......@@ -1511,7 +1511,7 @@ acpi_processor_add_fs (
ACPI_PROCESSOR_FILE_THROTTLING));
else {
entry->proc_fops = &acpi_processor_throttling_fops;
entry->write_proc = acpi_processor_write_throttling;
entry->proc_fops->write = acpi_processor_write_throttling;
entry->data = acpi_driver_data(device);
}
......@@ -1524,7 +1524,7 @@ acpi_processor_add_fs (
ACPI_PROCESSOR_FILE_LIMIT));
else {
entry->proc_fops = &acpi_processor_limit_fops;
entry->write_proc = acpi_processor_write_limit;
entry->proc_fops->write = acpi_processor_write_limit;
entry->data = acpi_driver_data(device);
}
......
......@@ -877,10 +877,12 @@ static int
acpi_thermal_write_trip_points (
struct file *file,
const char *buffer,
unsigned long count,
void *data)
size_t count,
loff_t *ppos)
{
struct acpi_thermal *tz = (struct acpi_thermal *) data;
struct seq_file *m = (struct seq_file *)file->private_data;
struct acpi_thermal *tz = (struct acpi_thermal *)m->private;
char limit_string[25] = {'\0'};
int critical, hot, passive, active0, active1;
......@@ -944,8 +946,8 @@ static int
acpi_thermal_write_cooling_mode (
struct file *file,
const char *buffer,
unsigned long count,
void *data)
size_t count,
loff_t *data)
{
int result = 0;
struct acpi_thermal *tz = (struct acpi_thermal *) data;
......@@ -1004,8 +1006,8 @@ static int
acpi_thermal_write_polling (
struct file *file,
const char *buffer,
unsigned long count,
void *data)
size_t count,
loff_t *data)
{
int result = 0;
struct acpi_thermal *tz = (struct acpi_thermal *) data;
......@@ -1079,10 +1081,10 @@ acpi_thermal_add_fs (
if (!entry)
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unable to create '%s' fs entry\n",
ACPI_THERMAL_FILE_POLLING_FREQ));
ACPI_THERMAL_FILE_TRIP_POINTS));
else {
entry->proc_fops = &acpi_thermal_trip_fops;
entry->write_proc = acpi_thermal_write_trip_points;
entry->proc_fops->write = acpi_thermal_write_trip_points;
entry->data = acpi_driver_data(device);
}
......@@ -1095,7 +1097,7 @@ acpi_thermal_add_fs (
ACPI_THERMAL_FILE_COOLING_MODE));
else {
entry->proc_fops = &acpi_thermal_cooling_fops;
entry->write_proc = acpi_thermal_write_cooling_mode;
entry->proc_fops->write = acpi_thermal_write_cooling_mode;
entry->data = acpi_driver_data(device);
}
......@@ -1108,7 +1110,7 @@ acpi_thermal_add_fs (
ACPI_THERMAL_FILE_POLLING_FREQ));
else {
entry->proc_fops = &acpi_thermal_polling_fops;
entry->write_proc = acpi_thermal_write_polling;
entry->proc_fops->write = acpi_thermal_write_polling;
entry->data = acpi_driver_data(device);
}
......
......@@ -309,8 +309,8 @@ static int toshiba_lcd_open_fs(struct inode *inode, struct file *file)
}
static int
proc_write_lcd(struct file* file, const char* buffer, unsigned long count,
void* data)
proc_write_lcd(struct file* file, const char* buffer, size_t count,
loff_t* data)
{
int value;
/*int byte_count;*/
......@@ -358,8 +358,8 @@ static int toshiba_video_open_fs(struct inode *inode, struct file *file)
}
static int
proc_write_video(struct file* file, const char* buffer, unsigned long count,
void* data)
proc_write_video(struct file* file, const char* buffer, size_t count,
loff_t* data)
{
int value;
const char* buffer_end = buffer + count;
......@@ -423,8 +423,8 @@ static int toshiba_fan_open_fs(struct inode *inode, struct file *file)
}
static int
proc_write_fan(struct file* file, const char* buffer, unsigned long count,
void* data)
proc_write_fan(struct file* file, const char* buffer, size_t count,
loff_t* data)
{
int value;
u32 hci_result;
......@@ -476,8 +476,8 @@ static int toshiba_keys_open_fs(struct inode *inode, struct file *file)
}
static int
proc_write_keys(struct file* file, const char* buffer, unsigned long count,
void* data)
proc_write_keys(struct file* file, const char* buffer, size_t count,
loff_t* data)
{
int value;
......@@ -518,28 +518,28 @@ add_device(void)
toshiba_proc_dir);
if (proc) {
proc->proc_fops = &toshiba_lcd_fops;
proc->write_proc = proc_write_lcd;
proc->proc_fops->write = proc_write_lcd;
}
proc = create_proc_entry(PROC_VIDEO, S_IFREG | S_IRUGO | S_IWUSR,
toshiba_proc_dir);
if (proc) {
proc->proc_fops = &toshiba_video_fops;
proc->write_proc = proc_write_video;
proc->proc_fops->write = proc_write_video;
}
proc = create_proc_entry(PROC_FAN, S_IFREG | S_IRUGO | S_IWUSR,
toshiba_proc_dir);
if (proc) {
proc->proc_fops = &toshiba_fan_fops;
proc->write_proc = proc_write_fan;
proc->proc_fops->write = proc_write_fan;
}
proc = create_proc_entry(PROC_KEYS, S_IFREG | S_IRUGO | S_IWUSR,
toshiba_proc_dir);
if (proc) {
proc->proc_fops = &toshiba_keys_fops;
proc->write_proc = proc_write_keys;
proc->proc_fops->write = proc_write_keys;
}
proc = create_proc_entry(PROC_VERSION, S_IFREG | S_IRUGO | S_IWUSR,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment