]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (lm70) Register hwmon device after creating attribute files, and remove it...
authorGuenter Roeck <linux@roeck-us.net>
Fri, 20 Jan 2012 04:58:13 +0000 (20:58 -0800)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Mon, 19 Mar 2012 01:27:39 +0000 (18:27 -0700)
commit6f1ab95d33f9329bab8cb390187b082545482ee5
treed877afb50cab0adc2b99f0fced55d7a038627257
parent210d19e705a0c670ed7416b98cb4509347c2fa20
hwmon: (lm70) Register hwmon device after creating attribute files, and remove it first

Register hwmon device as last operation in the probe function to ensure that all
attribute files exist when accessed from user applications. Otherwise, there
is a short time frame where the device is registered as hwmon device but
sysfs attributes do not yet exist. This could result in applications erroneously
not detecting attributes.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm70.c