Skip to contentSkip to conversation

Fix writing into /proc/acpi/thermal/*/trip_points

PATCH Pavel Machek 1 participant 1 message Jan 18, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi!

seq_file changes messed it up, please apply to fix at least trip_points.

Pavel

drivers/acpi/thermal.c +6 -5
@@ -878,15 +878,16 @@
 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;
 
 	ACPI_FUNCTION_TRACE("acpi_thermal_write_trip_points");
 
 	if (!tz || (count > sizeof(limit_string) - 1)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
 		return_VALUE(-EINVAL);
@@ -1080,10 +1084,10 @@
 	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);
 	}
 
Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?