More seq-file fixes for /proc/acpi
Subsystems (2)
Hi!
More seq-file fixes. [This is not a dup ;-)] Toshiba maintainer, please fix your stuff yourself. This should fix all /proc write problems in acpi I know... Please apply,
Pavel
drivers/acpi/processor.c +4 -2
@@ -1356,7 +1356,8 @@ loff_t *data) {int result =0 ; -struct acpi_processor *pr = (struct acpi_processor *) data; +struct seq_file *m = (struct seq_file *)file->private_data; +struct acpi_processor *pr = (struct acpi_processor *)m->private;char state_string[12 ] = {'\0' };ACPI_FUNCTION_TRACE ("acpi_processor_write_throttling" );
@@ -1418,7 +1419,8 @@ loff_t *data) {int result =0 ; -struct acpi_processor *pr = (struct acpi_processor *) data; +struct seq_file *m = (struct seq_file *)file->private_data; +struct acpi_processor *pr = (struct acpi_processor *)m->private;char limit_string[25 ] = {'\0' };int px =0 ;int tx =0 ;
drivers/acpi/thermal.c +8 -6
@@ -946,11 +948,12 @@acpi_thermal_write_cooling_mode ( struct file *file, const char *buffer, - size_t count, - loff_t *data) + unsigned long count, + loff_t *ppos) { int result = 0; -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 mode_string[12 ] = {'\0' };ACPI_FUNCTION_TRACE ("acpi_thermal_write_cooling_mode" );
@@ -1006,11 +1009,12 @@acpi_thermal_write_polling ( struct file *file, const char *buffer, - size_t count, - loff_t *data) + unsigned long count, + loff_t *ppos) { + struct seq_file *m = (struct seq_file *)file->private_data;int result =0 ; -struct acpi_thermal *tz = (struct acpi_thermal *) data; +struct acpi_thermal *tz = (struct acpi_thermal *) m->private;char polling_string[12 ] = {'\0' };int seconds =0 ;
drivers/acpi/toshiba_acpi.c +1 -0
@@ -519,6 +519,7 @@if (proc) { proc->proc_fops = &toshiba_lcd_fops; proc->proc_fops->write = proc_write_lcd; +#warning You need to fix up after converting to seq_file; see thermal.c for examples. } proc = create_proc_entry(PROC_VIDEO, S_IFREG | S_IRUGO | S_IWUSR,
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
A message that is not in the archive (sent off-list or not yet received): 20030213223900.GA141-I/[email protected]
Quoted 8 lines · Pavel Machek
More seq-file fixes. [This is not a dup ;-)] Toshiba maintainer, please fix your stuff yourself. This should fix all /proc write problems in acpi I know... Please apply,
drivers/acpi/toshiba_acpi.c line 525
Quoted 7 lines
drivers/acpi/toshiba_acpi.c +1
-0@@ -519,6 +519,7 @@if (proc) { proc->proc_fops = &toshiba_lcd_fops; proc->proc_fops->write = proc_write_lcd; +#warning You need to fix up after converting to seq_file; see thermal.c for examples. } proc = create_proc_entry(PROC_VIDEO, S_IFREG | S_IRUGO | S_IWUSR,
I take exception to this. The person who converted my driver to seq_file should be responsible for finishing the job.
I disagreed with the conversion to seq_file because it doesn't support an object oriented programming style, as I explained in a posting at the time the conversion took place.
-John
Signature · 9 lines
http:// if l . / ------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 20 lines
Quoted 12 lines
More seq-file fixes. [This is not a dup ;-)] Toshiba maintainer, please fix your stuff yourself. This should fix all /proc write problems in acpi I know... Please apply,
drivers/acpi/toshiba_acpi.c +1
-0@@ -519,6 +519,7 @@if (proc) { proc->proc_fops = &toshiba_lcd_fops; proc->proc_fops->write = proc_write_lcd; +#warning You need to fix up after converting to seq_file; see thermal.cfor examples.
Quoted 4 lines
} proc = create_proc_entry(PROC_VIDEO, S_IFREG | S_IRUGO | S_IWUSR,I take exception to this. The person who converted my driver to
seq_fileshould be responsible for finishing the job.
Quoted 3 lines
I disagreed with the conversion to
seq_filebecause it doesn't support an object oriented programming style, as I explained in a posting at the time the conversion took place.
Okay, find whoever did seq_file conversion, lock him into room and give him no pizza until he fixes it...
Pavel
PS: Or just post patch that reverses seq_file for toshiba_acpi....
Signature · 9 lines
Casualities in World Trade Center: ~3k dead inside the building, cryptography in U.S.A. and free speech in Czech Republic. ------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en