From b3a242a6e4b8c09dbb466ab7a9d2c724e75faa67 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 23 Sep 2011 06:35:00 -0400 Subject: [PATCH] hwmon: (coretemp) don't use kernel assigned CPU number as platform device ID ... as that has the potential to conflict with (particularly soft) CPU hot removal and re-adding. Signed-off-by: Jan Beulich [guenter.roeck@ericsson.com: use platform device ID as physical CPU id] Signed-off-by: Guenter Roeck --- drivers/hwmon/coretemp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 47364151e67a..6420c3be07b8 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -561,7 +561,7 @@ static int __devinit coretemp_probe(struct platform_device *pdev) if (err) goto exit_free; - pdata->phys_proc_id = TO_PHYS_ID(pdev->id); + pdata->phys_proc_id = pdev->id; platform_set_drvdata(pdev, pdata); pdata->hwmon_dev = hwmon_device_register(&pdev->dev); @@ -613,7 +613,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu) mutex_lock(&pdev_list_mutex); - pdev = platform_device_alloc(DRVNAME, cpu); + pdev = platform_device_alloc(DRVNAME, TO_PHYS_ID(cpu)); if (!pdev) { err = -ENOMEM; pr_err("Device allocation failed\n"); -- 2.39.2