]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (ibmpowernv) Use platform 'id_table' to probe the device
authorNeelesh Gupta <neelegup@linux.vnet.ibm.com>
Wed, 5 Nov 2014 11:15:14 +0000 (16:45 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 1 Dec 2014 04:13:13 +0000 (20:13 -0800)
commit13a1c906870857a0e3514a2ea33c5fa599254ef0
treeaebed1e9b49707c35f3f1ca43611192287cf0d87
parent9a651e56ba188d94e5e6c68f4c08a700b7cfb424
hwmon: (ibmpowernv) Use platform 'id_table' to probe the device

The current driver probe() function assumes the sensor device to be
always present and gets executed every time if the driver is loaded,
but the appropriate hardware could not be present.

So, move the platform device creation as part of platform init code
and use the 'id_table' to check if the device is present or not.

Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
arch/powerpc/platforms/powernv/opal-sensor.c
drivers/hwmon/ibmpowernv.c