提交 b3a242a6 编写于 作者: J Jan Beulich 提交者: Guenter Roeck

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: NJan Beulich <jbeulich@suse.com>
[guenter.roeck@ericsson.com: use platform device ID as physical CPU id]
Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
上级 cc41d586
...@@ -561,7 +561,7 @@ static int __devinit coretemp_probe(struct platform_device *pdev) ...@@ -561,7 +561,7 @@ static int __devinit coretemp_probe(struct platform_device *pdev)
if (err) if (err)
goto exit_free; goto exit_free;
pdata->phys_proc_id = TO_PHYS_ID(pdev->id); pdata->phys_proc_id = pdev->id;
platform_set_drvdata(pdev, pdata); platform_set_drvdata(pdev, pdata);
pdata->hwmon_dev = hwmon_device_register(&pdev->dev); pdata->hwmon_dev = hwmon_device_register(&pdev->dev);
...@@ -613,7 +613,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu) ...@@ -613,7 +613,7 @@ static int __cpuinit coretemp_device_add(unsigned int cpu)
mutex_lock(&pdev_list_mutex); mutex_lock(&pdev_list_mutex);
pdev = platform_device_alloc(DRVNAME, cpu); pdev = platform_device_alloc(DRVNAME, TO_PHYS_ID(cpu));
if (!pdev) { if (!pdev) {
err = -ENOMEM; err = -ENOMEM;
pr_err("Device allocation failed\n"); pr_err("Device allocation failed\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册