]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (coretemp) Fixup platform device ID change
authorJean Delvare <khali@linux-fr.org>
Wed, 28 Sep 2011 15:11:00 +0000 (08:11 -0700)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Wed, 28 Sep 2011 15:19:20 +0000 (08:19 -0700)
commit88c3f5dd8ad1fbc54ad6958ac321c3921dd267d8
tree9ef8d8f799df410990aa48ca5fd7518b9ba24495
parentc850e29e61dee8be5ed93cf7fda99e07e2e1e70d
hwmon: (coretemp) Fixup platform device ID change

With recent change "hwmon: (coretemp) don't use kernel assigned CPU
number as platform device ID", the microcode check is now running on
random CPU. Fix that by checking the microcode before creating the
platform device rather than at probe time.

Also avoid calling TO_PHYS_ID(cpu) twice in the same function, it's
expensive.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/coretemp.c