Skip to contentSkip to conversation

hwmon: (coretemp) update hotplug

PATCH Jean Delvare 1 participant 1 message Aug 11, 2010

lore
Share & tools
lore
#0 lore raw
Quoted 46 lines · Chen Gong
Quoted 31 lines · Chen Gong

this patch fixes two errors about hotplug. One is for hotplug notifier. The other is unnecessary driver unregister. Because even none of online cpus supports coretemp, we can't assume new onlined cpu doesn't support it either. If related driver is unregistered there we have no chance to use coretemp from then on.

---
  drivers/hwmon/coretemp.c |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
drivers/hwmon/coretemp.c +3 -0
index 05344af..c05dc91 100644
@@ -502,10 +502,13 @@ static int __cpuinit coretemp_cpu_callback(struct notifier_block *nfb,
 
  	switch (action) {
  	case CPU_ONLINE:
+	case CPU_ONLINE_FROZEN:
  	case CPU_DOWN_FAILED:
+	case CPU_DOWN_FAILED_FROZEN:
  		coretemp_device_add(cpu);
  		break;
  	case CPU_DOWN_PREPARE:
+	case CPU_DOWN_PREPARE_FROZEN:
  		coretemp_device_remove(cpu);
  		break;
  	}

drivers/hwmon/coretemp.c exit_devices_unreg: · line 577

Quoted 9 lines
drivers/hwmon/coretemp.c +2 -0
@@ -566,7 +569,9 @@ exit_devices_unreg:
  	}
  	mutex_unlock(&pdev_list_mutex);
  exit_driver_unreg:
+#ifndef CONFIG_HOTPLUG_CPU
  	platform_driver_unregister(&coretemp_driver);
+#endif
  exit:
  	return err;
  }

Hi, Jean
what's your opinion for the left part after deleting
CPU_ONLINE_FROZEN/CPU_DOWN_FAILED_FROZEN etc ?

Quoted 1 line

Is it still reasonable ?

I was on vacation, sorry for the delay. I don't have any opinion on this other than what I already said. And apparently Andrew is taking care, thanks Andrew.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors