* More seq-file fixes for /proc/acpi
@ 2003-02-13 22:39 Pavel Machek
[not found] ` <20030213223900.GA141-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2003-02-13 22:39 UTC (permalink / raw)
To: Andrew Grover, kernel list, ACPI mailing list; +Cc: Patrick Mochel
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
--- clean/drivers/acpi/processor.c 2003-02-11 17:40:46.000000000 +0100
+++ linux/drivers/acpi/processor.c 2003-02-13 23:16:28.000000000 +0100
@@ -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;
--- clean/drivers/acpi/thermal.c 2003-02-11 17:40:46.000000000 +0100
+++ linux/drivers/acpi/thermal.c 2003-02-13 23:17:37.000000000 +0100
@@ -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;
--- clean/drivers/acpi/toshiba_acpi.c 2003-02-11 17:40:46.000000000 +0100
+++ linux/drivers/acpi/toshiba_acpi.c 2003-02-13 23:17:16.000000000 +0100
@@ -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,
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: More seq-file fixes for /proc/acpi
[not found] ` <20030213223900.GA141-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2003-02-14 21:18 ` John Belmonte
[not found] ` <3E4D5D36.4080100-ZFKsivP1bGvOQU1ULcgDhA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: John Belmonte @ 2003-02-14 21:18 UTC (permalink / raw)
To: acpi-devel; +Cc: Pavel Machek
Pavel Machek wrote:
> 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,
> --- clean/drivers/acpi/toshiba_acpi.c 2003-02-11 17:40:46.000000000 +0100
> +++ linux/drivers/acpi/toshiba_acpi.c 2003-02-13 23:17:16.000000000 +0100
> @@ -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
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: More seq-file fixes for /proc/acpi
[not found] ` <3E4D5D36.4080100-ZFKsivP1bGvOQU1ULcgDhA@public.gmane.org>
@ 2003-02-14 21:34 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2003-02-14 21:34 UTC (permalink / raw)
To: John Belmonte; +Cc: acpi-devel, Pavel Machek
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,
>
> >--- clean/drivers/acpi/toshiba_acpi.c 2003-02-11 17:40:46.000000000 +0100
> >+++ linux/drivers/acpi/toshiba_acpi.c 2003-02-13 23:17:16.000000000 +0100
> >@@ -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.
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....
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-02-14 21:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-13 22:39 More seq-file fixes for /proc/acpi Pavel Machek
[not found] ` <20030213223900.GA141-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-02-14 21:18 ` John Belmonte
[not found] ` <3E4D5D36.4080100-ZFKsivP1bGvOQU1ULcgDhA@public.gmane.org>
2003-02-14 21:34 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox