Age | Commit message (Collapse) | Author |
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Alistair John Strachan <alistair@devzero.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Fix:
warning: 'address' may be used uninitialized in this function
warning: 'name' may be used uninitialized in this function
While those are false warnings, the patch reduces module size on x86_64 by
approximately 110 bytes, so it is still worth the effort.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
|
|
Fix:
warning: 'address' may be used uninitialized in this function [-Wuninitialized]
While this is a false warning, the patch reduces module size on x86_64 by
approximately 175 bytes, so it is still worth the effort.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
|
|
The quirk introduced with commit
00250ec90963b7ef6678438888f3244985ecde14 (hwmon: fam15h_power: fix
bogus values with current BIOSes) is not only required during driver
load but also when system resumes from suspend. The BIOS might set the
previously recommended (but unsuitable) initilization value for the
running average range register during resume.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Tested-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@vger.kernel.org # 3.0+
|
|
coretemp_init loops with for_each_online_cpu, adding platform_devices
and sysfs interfaces, then calls register_hotcpu_notifier. There is a
race if a CPU is offlined or onlined after the loop, but before
register_hotcpu_notifier. The race might result in the absence of a
platform_device+sysfs interface for an online CPU, or the presence of
a platform_device+sysfs interface for an offline CPU. A similar race
occurs during coretemp_exit, after the module calls
unregister_hotcpu_notifier, but before it unregisters all devices, a
CPU might offline and a device for an offline CPU will exist for a
short while.
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>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
|
|
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>
|
|
into late/kirkwood
From Jason Cooper:
New bindings:
- iconnect nand and keys
- mv_cesa
- gpio-fan
* 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux:
ARM: kirkwood: Use devicetree to define DNS-32[05] fan
hwmon: Add devicetree bindings to gpio-fan
Crypto: CESA: Add support for DT based instantiation.
ARM: Kirkwood: Describe iconnect nand in DT.
ARM: Kirkwood: Describe iconnect keys in DT.
|
|
Allow a gpio-fan to be defined in devicetree, see binding documentation
for details.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
|
|
* multiplatform/platform-data:
ARM: spear: move platform_data definitions
ARM: samsung: move platform_data definitions
ARM: orion: move platform_data definitions
ARM: nomadik: move platform_data definitions
ARM: w90x900: move platform_data definitions
ARM: vt8500: move platform_data definitions
ARM: tegra: move sdhci platform_data definition
ARM: sa1100: move platform_data definitions
ARM: pxa: move platform_data definitions
ARM: netx: move platform_data definitions
ARM: msm: move platform_data definitions
ARM: imx: move platform_data definitions
ARM: ep93xx: move platform_data definitions
ARM: davinci: move platform_data definitions
ARM: at91: move platform_data definitions
Conflicts due to removed files:
arch/arm/mach-tegra/board-harmony.c
arch/arm/mach-tegra/board-trimslice.c
Conflicts due to code removal:
arch/arm/mach-tegra/board-paz00.c
Context conflicts in:
drivers/mmc/host/sdhci-tegra.c
drivers/net/irda/pxaficp_ir.c
Signed-off-by: Olof Johansson <olof@lixom.net>
|
|
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.
This moves such data out of the samsung include directories
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: linux-samsung-soc@vger.kernel.org
|
|
A heavy-load test on a MacBookPro6,1 is still showing a substantial
amount of read errors. Increasing the maximum wait time to 128 ms
resolves the issue.
Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
in this driver.
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
|
|
The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
in this driver.
Cc: Paul Thomas <pthomas8589@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Paul Thomas <pthomas8589@gmail.com>
|
|
The driver uses be16_to_cpu and cpu_to_be16 to convert data in SMBus word
operations from chip to host byte order. However, the data passed from and to
the SMBus word API functions is in host byte order, not in chip byte order.
Conversion should therefore use swab16 instead of be16 to change the byte order.
Replace driver internal word conversion functions with SMBus API functions to
solve the problem.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org # 3.5+
Acked-by: Jean Delvare <khali@linux-fr.org>
|
|
twl4030_madc_conversion uses do_avg and type structure elements of
twl4030_madc_request. Initialize structure to avoid random operation.
Fix for: Coverity CID 200794 Uninitialized scalar variable.
Cc: Keerthy <j-keerthy@ti.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Keerthy <j-keerthy@ti.com>
|
|
The old interface is bugged and reads the wrong sensor when retrieving
the reading for the chassis fan (it reads the CPU sensor); the new
interface works fine.
Reported-by: Göran Uddeborg <goeran@uddeborg.se>
Cc: stable@vger.kernel.org
Tested-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull a howmon update from Jean Delvare.
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: struct x86_cpu_id arrays can be __initconst
|
|
... as being referenced from __init code only.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
|
|
The behavior of the SMC has changed several times over the years,
causing read failures in the driver. It seems the problem can be
explained by a shift in SMC speed combined with improper action on
status codes.
We should first wait for the SMC to settle, which was the most
frequent response on the old slow machines. Then, if the SMC is busy,
we need to try again later by resending the command. This was the most
likely response until 2012. Now, with a shorter wait time, we are
again most likely to poll while the SMC is settling, and as a result
we see high failure rates on many old and new models.
With the distinction between busy and failure, we can also wait longer
before retrying, without sacrificing speed. This seems to bring
failures down to virtually zero on all models.
Tested on: MBA1,1 MBA3,1 MBA5,1 MBA5,2 MBP9,2
Tested-by: Adam Somerville <adamsomerville@gmail.com>
Tested-by: Hubert Eichner <hubert.georg.eichner@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Restoring the configuration register on device removal has the side
effect of also resetting the hysteresis value. This is inconsistent as
the other limits are not reset, only hysteresis. So, following the
principle of least surprise, preserve the hysteresis value when
restoring the configuration register.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Define JC42_CFG_HYST_MASK as the mask _before_ shifting instead of
after shifting. This simplifies the current code slightly, and will
simplify the code to come even more.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Commit c5dec0182256361a3f823316e8fb85263f76efe7 (acpi_power_meter: Use struct
dev_pm_ops for power management) introduced the following build warning. It is
seen if CONFIG_PM_SLEEP is not defined.
acpi_power_meter.c:930:12: warning: acpi_power_meter_resume defined but not used
Fix it.
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree from Jiri Kosina:
"Trivial updates all over the place as usual."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (29 commits)
Fix typo in include/linux/clk.h .
pci: hotplug: Fix typo in pci
iommu: Fix typo in iommu
video: Fix typo in drivers/video
Documentation: Add newline at end-of-file to files lacking one
arm,unicore32: Remove obsolete "select MISC_DEVICES"
module.c: spelling s/postition/position/g
cpufreq: Fix typo in cpufreq driver
trivial: typo in comment in mksysmap
mach-omap2: Fix typo in debug message and comment
scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
Change email address for Steve Glendinning
Btrfs: fix typo in convert_extent_bit
via: Remove bogus if check
netprio_cgroup.c: fix comment typo
backlight: fix memory leak on obscure error path
Documentation: asus-laptop.txt references an obsolete Kconfig item
Documentation: ManagementStyle: fixed typo
mm/vmscan: cleanup comment error in balance_pgdat
mm: cleanup on the comments of zone_reclaim_stat
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
"New drivers for DA9052/53 PMIC as well as HIH-6130/HIH-6131 humidity
and temperature sensors.
Convert drivers to use devm_ functions and to use dev_pm_ops. Address
a couple of Coverity errors/warnings as well as compile warnings.
Some functional improvements in applesmc driver."
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (72 commits)
hwmon: (applesmc) Ignore some temperature registers
hwmon: (applesmc) Allow negative temperature values
hwmon: (s3c-hwmon) Use devm_kzalloc instead of kzalloc
hwmon: (w83781d) Fix compile warning
hwmon: (applesmc) Shorten minimum wait time
hwmon: (exynos4_tmu) Use struct dev_pm_ops for power management
hwmon: (gpio-fan) Use struct dev_pm_ops for power management
hwmon: (abituguru3) Use struct dev_pm_ops for power management
hwmon: (abituguru) Use struct dev_pm_ops for power management
hwmon: (acpi_power_meter) Fix unintentional integer overflow
hwmon: (acpi_power_meter) Cleanup and optimizations
hwmon: Honeywell Humidicon HIH-6130/HIH-6131 humidity and temperature sensor driver
hwmon: (applesmc) Skip sensor mapping
hwmon: (ntc_thermistor) Ensure that data->name string is terminated
hwmon: (w83l785ts) Convert to use devm_ functions
hwmon: (w83l785ts) Simplify code and improve readability
hwmon: (smsc47m192) Convert to use devm_ functions
hwmon: (smsc47m1) Convert to use devm_ functions
hwmon: (smsc47b397) Convert to use devm_ functions
hwmon: (k8temp) Convert to use devm_ functions
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/mce changes from Ingo Molnar:
"This tree improves the AMD thresholding bank code and includes a
memory fault signal handling fixlet."
* 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mce: Fix siginfo_t->si_addr value for non-recoverable memory faults
x86, MCE, AMD: Update copyrights and boilerplate
x86, MCE, AMD: Give proper names to the thresholding banks
x86, MCE, AMD: Make error_count read only
x86, MCE, AMD: Cleanup reading of error_count
x86, MCE, AMD: Print decimal thresholding values
x86, MCE, AMD: Move shared bank to node descriptor
x86, MCE, AMD: Remove local_allocate_... wrapper
x86, MCE, AMD: Remove shared banks sysfs linking
x86, amd_nb: Export model 0x10 and later PCI id
|
|
Not all sensors in the T range are useful temperatures. This patch
creates a subset of sensors to be exported to userland, excluding the
unknown types.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
There are many userland reports of sensors with unreasonably small and
large temperatures. There seem to be several reasons for this:
Firstly, the major sensor type (sp78) is actually a signed number.
This explains why some sensors show very small or large values - they
are in fact all small, but of different sign.
Secondly, the other sensor type (1-hex) is not properly understood; it
may be that it is not a temperature after all.
Thirdly, some sensors are differential in nature, showing changes over
time rather than absolute numbers. This explains why those values are
small and of varying sign.
This patch interprets the sp78 type as signed short, but keeps the
original scaling. For other types, -EINVAL is returned, since the
nature of those sensors is unknown.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
This makes the code simpler as explicit freeing is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
The following compile warning may be seen if the driver is compiled with
-Wuninitialized:
drivers/hwmon/w83781d.c: warning: 'sc_addr[1]' may be used uninitialized in this
function [-Wuninitialized]
While this is a false positive, it is annoying in nightly builds, and may help
to conceal real problems. The current code is quite tricky, and and it is easy
to rearrage the code to make the warning disappear. So fix it.
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
The 2012 series of MacBooks have a faster SMC, and the current driver
timings do not work at all. Tests show that decreasing the minimum
wait time, from 64 us to 16 us, works well. Since this is still larger
than the original minimum of 10 us used before 2008, there is nothing
inherently problematic with changing it. The fail frequency on older
machines seems to increase slightly, but not enough to be noticeable.
Tested on MBA11, MBA31, MBA5,2, MBP9,2.
The patch was originally written by adamski99 (ubuntuforums.org) and
later tested by janhouse (bbs.archlinux.org).
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Make the Exynos4 TMU driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
[linux@roeck-us.net: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Make the gpio-fan driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
[linux@roeck-us.net: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Make the Abit uGuru rev. 3 driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
[linux@roeck-us.net: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Make the Abit uGuru driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
[linux@roeck-us.net: CONFIG_PM->CONFIG_PM_SLEEP, and remove unnecessary ()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
|
Expression with two integer variables is calculated as integer before it is
converted to u64. This may result in an integer overflow. Fix by declaring
trip point variables as s64 instead of int.
This patch addresses Coverity #200596: Unintentional integer overflow.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
|