diff options
author | Jan Beulich <JBeulich@suse.com> | 2011-09-23 06:35:00 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-09-23 13:38:09 -0400 |
commit | b3a242a6e4b8c09dbb466ab7a9d2c724e75faa67 (patch) | |
tree | 6719cdf59b4c6845759b7c818253b3f77c4b0a69 | |
parent | cc41d586e8b4d76164fe7731c1c49be6cc5fc7e6 (diff) |
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 <jbeulich@suse.com>
[guenter.roeck@ericsson.com: use platform device ID as physical CPU id]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
-rw-r--r-- | drivers/hwmon/coretemp.c | 4 |
1 files 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) | |||
561 | if (err) | 561 | if (err) |
562 | goto exit_free; | 562 | goto exit_free; |
563 | 563 | ||
564 | pdata->phys_proc_id = TO_PHYS_ID(pdev->id); | 564 | pdata->phys_proc_id = pdev->id; |
565 | platform_set_drvdata(pdev, pdata); | 565 | platform_set_drvdata(pdev, pdata); |
566 | 566 | ||
567 | pdata->hwmon_dev = hwmon_device_register(&pdev->dev); | 567 | pdata->hwmon_dev = hwmon_device_register(&pdev->dev); |
@@ -613,7 +613,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu) | |||
613 | 613 | ||
614 | mutex_lock(&pdev_list_mutex); | 614 | mutex_lock(&pdev_list_mutex); |
615 | 615 | ||
616 | pdev = platform_device_alloc(DRVNAME, cpu); | 616 | pdev = platform_device_alloc(DRVNAME, TO_PHYS_ID(cpu)); |
617 | if (!pdev) { | 617 | if (!pdev) { |
618 | err = -ENOMEM; | 618 | err = -ENOMEM; |
619 | pr_err("Device allocation failed\n"); | 619 | pr_err("Device allocation failed\n"); |