aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/via-cputemp.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-07-14hwmon: delete __cpuinit usage from all hwmon filesPaul Gortmaker1-4/+4
The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. This removes all the drivers/hwmon uses of the __cpuinit macros from all C files. [1] https://lkml.org/lkml/2013/5/20/589 Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: lm-sensors@lm-sensors.org Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-11-28hwmon: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28hwmon: remove use of __devinitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28hwmon: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-23hwmon: (via-cputemp) Convert to use devm_ functionsGuenter Roeck1-16/+7
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23hwmon: (via-cputemp) Use get_online_cpus to avoid races involving CPU hotplugSilas Boyd-Wickizer1-0/+5
via_cputemp_init loops with for_each_online_cpu, adding platform_devices, then calls register_hotcpu_notifier. If a CPU is offlined between the loop and register_hotcpu_notifier, then later onlined, via_cputemp_device_add will attempt to add platform devices with the same ID. A similar race occurs during via_cputemp_exit, after the module calls unregister_hotcpu_notifier, a CPU might offline and a device will exist for a CPU that is offline. This fix surrounds for_each_online_cpu and register_hotcpu_notifier with get_online_cpus+put_online_cpus; and surrounds unregister_hotcpu_notifier and device unregistering with get_online_cpus+put_online_cpus. Build tested. Signed-off-by: Silas Boyd-Wickizer <sbw@mit.edu> Acked-by: Harald Welte <laforge@gnumonks.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-07-30hwmon: struct x86_cpu_id arrays can be __initconstJan Beulich1-1/+1
... as being referenced from __init code only. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-01-26HWMON: Convert via-cputemp to x86 cpuid autoprobingAndi Kleen1-5/+11
Use the new x86 cpuid autoprobe interface. Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-25hwmon: (via-cputemp) Add VID reporting supportJean Delvare1-5/+39
At least VIA family 6 model D CPU report the VID settings in a MSR, so expose the value to user-space. Not sure about model A. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Tested-by: Jeff Rickman <jrickman@myamigos.us>
2011-01-08hwmon: (via-cputemp) sync hotplug handling with coretemp/pkgtempJan Beulich1-14/+11
Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (via-cputemp) Use pr_fmt and pr_<level>Joe Perches1-5/+5
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-25hwmon: ({core, pkg, via-cpu}temp) remove unnecessary CONFIG_HOTPLUG_CPU ifdefsChen Gong1-6/+1
CONFIG_HOTPLUG_CPU is used too much in some drivers. This patch clean them up. Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-25x86/hwmon: remove inclusion of unnecessary headers from {core, pkg, via-cpu}temp.cJan Beulich1-2/+0
These likely originate from these drivers being clones of one another and/or other drivers which actually needed these includes. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-25x86/hwmon: {core, pkg, via}cpu_temp_device_remove() can all be __cpuinitJan Beulich1-1/+1
... as they're being called only from a __cpuinit function. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-08-14hwmon: (via-cputemp) Remove bogus "SHOW" global variableH. Peter Anvin1-1/+1
The via-cputemp hwmon driver was probably intending "typedef enum { ... } SHOW;", but the "typedef" was missing creating a global variable named "SHOW". There is absolutely no reason to have this in the global namespace. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Acked-by: Harald Welte <HaraldWelte@viatech.com> Cc: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-12-16hwmon: Add driver for VIA CPU core temperatureHarald Welte1-0/+356
This is a driver for the on-die digital temperature sensor of VIA's recent CPU models. [JD: Misc clean-ups.] Signed-off-by: Harald Welte <HaraldWelte@viatech.com> Cc: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Adam Nielsen <a.nielsen@shikadi.net>