]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: Introduce dummy functions when thermal is not defined
authorNishanth Menon <nm@ti.com>
Sat, 14 Feb 2015 01:28:02 +0000 (19:28 -0600)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 24 Feb 2015 18:40:42 +0000 (14:40 -0400)
commitf76ec0bbdd09ab27bc821832e82d2f334851794e
tree739998e96fa3c1d9fd2c7ec33806e41a064e1b1c
parentc29d834835a21832078f5d4954bb8c7fa4d97e94
thermal: Introduce dummy functions when thermal is not defined

When CONFIG_THERMAL is not enabled, it is better to introduce
equivalent dummy functions in the exported header than to
introduce #ifdeffery in drivers using the function.

This will prevent issues such as that reported in:
http://www.spinics.net/lists/linux-next/msg31573.html

While at it switch over to IS_ENABLED for thermal macros
to allow for thermal framework to be built as framework
and relevant APIs be usable by relevant drivers as a result.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
include/linux/thermal.h