Skip to contentSkip to conversation

Little patch for old gcc (lm_sensors 2.8.8)

PATCH Alain VALLETON 2 participants 2 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

Otherwise compilation of lm_sensors 2.8.8 fails with gcc 2.95.3

Have a nice day,

kernel/chips/lm93.c +2 -1
diff -Naur lm_sensors-2.8.8/kernel/chips/lm93.c lm_sensors-2.8.8_new/kernel/chips/lm93.c
@@ -1678,6 +1678,7 @@
 {
 	struct lm93_data *data = client->data;
 	int nr = ctl_name - LM93_SYSCTL_FAN1_SMART_TACH;
+	int mapping = 0;
 
 	if (0 > nr || nr > 3)
 		return; /* ERROR */
@@ -1688,7 +1689,7 @@
 		lm93_update_client(client);
 
 		/* extract the relevant mapping */
-		int mapping = (data->sf_tach_to_pwm >> (nr * 2)) & 0x03;
+		mapping = (data->sf_tach_to_pwm >> (nr * 2)) & 0x03;
 
 		/* if there's a mapping and it's enabled */
 		if (mapping && ((data->sfc2 >> nr) & 0x01))
#1 lore raw

Hi Alain:

Quoted 1 line · Alain VALLETON

Otherwise compilation of lm_sensors 2.8.8 fails with gcc 2.95.3

This was already fixed in CVS (patch by Axel Thimm) but thanks anyway.

Regards,

Signature · 2 lines
Mark M. Hoffman
[email protected]