Skip to content

Commit

Permalink
hwmon: (coretemp) don't use kernel assigned CPU number as platform de…
Browse files Browse the repository at this point in the history
…vice 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>
  • Loading branch information
Jan Beulich authored and Guenter Roeck committed Sep 23, 2011
1 parent cc41d58 commit b3a242a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/coretemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit b3a242a

Please sign in to comment.