summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: Correct some typosLABBE Corentin2013-10-188-10/+10
| | | | | Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (gpio-fan) Include linux/of.h headerSachin Kamat2013-10-181-0/+1
| | | | | | | 'of_match_ptr' is defined in linux/of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (lm70) Remove redundant spi_set_drvdataSachin Kamat2013-10-181-2/+0
| | | | | | | | Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Kaiwan N Billimoria <kaiwan@designergraphix.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adcxx) Remove redundant spi_set_drvdataSachin Kamat2013-10-181-2/+0
| | | | | | | | | Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Marc Pignat <marc.pignat@hevs.ch> Acked-by: Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (jc42) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | drivers/hwmon/jc42.c:521:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ltc4261) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | drivers/hwmon/ltc4261.c:243:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (lm95234) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | drivers/hwmon/lm95234.c:704:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (max6697) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | drivers/hwmon/max6697.c:649:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (max6642 fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | drivers/hwmon/max6642.c:299:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ds1621) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | drivers/hwmon/ds1621.c:381:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nct6775) fix coccinelle warningsFengguang Wu2013-10-181-4/+1
| | | | | | | | | | | | drivers/hwmon/nct6775.c:3866:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (jc42) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-36/+25
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ltc4261) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-39/+16
| | | | | | Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ina209) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-28/+18
| | | | | | Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (lm95234) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-87/+50
| | | | | | Also use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (tmp401) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-181-64/+28
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ina2xx) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-43/+21
| | | | | | | | Also introduce dev variable in probe function to simplify access to client->dev, and use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (max16065) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-72/+52
| | | | | | | | Modify code to use is_visible to determine if an attribute should be created or not, then use devm_hwmon_device_register_with_groups to create the hwmon device and all attributes in one operation. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (max6697) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-37/+17
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (lm73) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-48/+22
| | | | | | | Also introduce new variable dev pointing to client->dev in the probe function, and use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (max6642) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-48/+24
| | | | | | | | Also rename new_client variable to client and introduce new variable dev pointing to client->dev in the probe function, and use new macro ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ds1621) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-20/+4
| | | | | | Also use new macro __ATTRIBUTE_GROUPS to declare attribute groups. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nct6775) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck2013-10-131-16/+5
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: Provide managed hwmon registrationGuenter Roeck2013-10-132-0/+68
| | | | | | | | | | | Drivers using the new hwmon_device_register_with_groups API often have a remove function which consists solely of a call hwmon_device_unregister(). Provide support for devm_hwmon_device_register_with_groups and devm_hwmon_device_unregister to allow this repeated code to be removed and help eliminate error handling code. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nct6775) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-86/+36
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-13/+7
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ltc4245) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-54/+24
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (gpio-fan) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-27/+14
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (ds1621) Convert to use hwmon_device_register_with_groupsGuenter Roeck2013-10-131-33/+27
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: Introduce hwmon_device_register_with_groupsGuenter Roeck2013-10-132-16/+111
| | | | | | | | | | hwmon_device_register_with_groups() lets callers register a hwmon device together with all sysfs attributes in a single call. When using hwmon_device_register_with_groups(), hwmon attributes are attached to the hwmon device directly and no longer with its parent device. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (f71882fg) Remove extra return statementGuenter Roeck2013-10-131-1/+0
| | | | | | | Leftover from commit 33cd66e3 (hwmon: (f71882fg) Convert to use devm_ functions). Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (f75375s) Don't crash the kernel unnecessarilyGuenter Roeck2013-10-131-2/+2
| | | | | | | | | | The f75375s driver crashes the kernel if it detects an an internal implementation error. While the detected conditions suggest that there is a bug in the code, the condition is not fatal. Replace BUG() with WARN(). Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (atxp1) Set and use error code from vid_to_reg()Guenter Roeck2013-10-132-3/+2
| | | | | | | | | | vid_to_reg() returns -1 if it encounters an error. Return -EINVAL instead. Its only caller, atxp1_storevcore(), doesn't use the return code but returns -1 instead, which is wrong anyway as it means -EPERM. Use the return value from vid_to_reg() instead to report the error. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (acpi_power_meter) Use return value from acpi_bus_register_driverGuenter Roeck2013-10-131-1/+1
| | | | | | acpi_bus_register_driver() returns a valid error code. Use it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (acpi_power_meter) Don't crash the kernel unnecessarilyGuenter Roeck2013-10-131-3/+8
| | | | | | | | | acpi_power_meter crashes the kernel if it detects an unexpected event or an internal implementation error. While the detected conditions suggest that there is a bug in the code, the condition is not fatal. Replace BUG() with WARN(). Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (gpio_fan) Use error value returned from get_fan_speed_index()Guenter Roeck2013-10-131-2/+2
| | | | | | | get_fan_speed_index() returns -EINVAL in case of errors, only to have it ignored and replaced with -ENODEV. Make it return -ENODEV and use it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adt7462) Use error value returned from find_trange_value()Guenter Roeck2013-10-131-3/+2
| | | | | | | | find_trange_value() returns -ENODEV in case of errors, only to have it ignored and replaced with -EINVAL. Make it return -EINVAL and use it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (pmbus) Don't unnecessarily crash the kernelGuenter Roeck2013-10-131-1/+1
| | | | | | | | | pmbus code currently crashes the kernel if it detects an internal implementation error. While the detected condition suggests that there is a bug in the code, it is hardly fatal. Therefore, it should not trigger a crash. Replace BUG() with WARN(). Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (mc13783-adc) Increase size of name stringGuenter Roeck2013-10-131-1/+1
| | | | | | | | | | | | smatch complains about mc13783_adc_probe() error: snprintf() chops off the last chars of 'id->name': 20 +vs 10 Use PLATFORM_NAME_SIZE instead of '10' as size when declaring the name variable. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nct6775) Check array index when accessing temp_offsetGuenter Roeck2013-10-131-1/+2
| | | | | | | | | | smatch complains about a potential out-of-bounds access to the temp_offset array. That doesn't happen in practice, but it doesn't hurt to add an explicit check either. This prevents potential problems in the future (for example if the number of 'fixed' temperature sensors is increased to add support for another chip). Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nct6775) Use return value from find_temp_sourceGuenter Roeck2013-10-131-2/+2
| | | | | | | | smatch complains that we don't use the return value from find_temp_source(). Valid point, only find_temp_source() doesn't return a valid error code. Have it return a valid error code and use it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: Remove unnecessary semicolonsGuenter Roeck2013-10-132-9/+9
| | | | | | | | Semicolons after closing } of conditional blocks are not needed and can be removed. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <khali@linux-fr.org>
* Linux 3.12-rc5v3.12-rc5Linus Torvalds2013-10-131-1/+1
|
* Merge git://www.linux-watchdog.org/linux-watchdogLinus Torvalds2013-10-133-4/+5
|\ | | | | | | | | | | | | | | | | | | | | Pull watchdog fixes from Wim Van Sebroeck: "This will fix a deadlock on the ts72xx_wdt driver, fix bitmasks in the kempld_wdt driver and fix a section mismatch in the sunxi_wdt driver" * git://www.linux-watchdog.org/linux-watchdog: watchdog: sunxi: Fix section mismatch watchdog: kempld_wdt: Fix bit mask definition watchdog: ts72xx_wdt: locking bug in ioctl
| * watchdog: sunxi: Fix section mismatchMaxime Ripard2013-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver has a section mismatch, for probe and remove functions, leading to the following warning during the compilation. WARNING: drivers/watchdog/built-in.o(.data+0x24): Section mismatch in reference from the variable sunxi_wdt_driver to the function .init.text:sunxi_wdt_probe() The variable sunxi_wdt_driver references the function __init sunxi_wdt_probe() Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * watchdog: kempld_wdt: Fix bit mask definitionJingoo Han2013-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)' handles [9:8] bits. Thus, it should be fixed in order to handle [5:4] bits. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * watchdog: ts72xx_wdt: locking bug in ioctlDan Carpenter2013-10-131-1/+2
| | | | | | | | | | | | | | | | | | Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a interruptible deadlock. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* | Merge tag 'fixes-for-linus' of ↵Linus Torvalds2013-10-139-12/+50
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A small batch of fixes this week, mostly OMAP related. Nothing stands out as particularly controversial. Also a fix for a 3.12-rc1 timer regression for Exynos platforms, including the Chromebooks" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: exynos: dts: Update 5250 arch timer node with clock frequency ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config ARM: mach-omap2: board-generic: fix undefined symbol ARM: dts: Fix pinctrl mask for omap3 ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT
| * | ARM: exynos: dts: Update 5250 arch timer node with clock frequencyYuvaraj Kumar C D2013-10-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without the "clock-frequency" property in arch timer node, could able to see the below crash dump. [<c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14) [<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0) [<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18) [<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58) [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c) [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c) THis is because the Exynos u-boot, for example on the Chromebooks, doesn't set up the CNTFRQ register as expected by arch_timer. Instead, we have to specify the frequency in the device tree like this. Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com> [olof: Changed subject, added comment, elaborated on commit message] Signed-off-by: Olof Johansson <olof@lixom.net>
| * | Merge tag 'fixes-against-v3.12-rc3-take2' of ↵Olof Johansson2013-10-138-12/+45
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes From Tony Lindgren: Few fixes for omap3 related hangs and errors that people have noticed now that people are actually using the device tree based booting for omap3. Also one regression fix for timer compile for dra7xx when omap5 is not selected, and a LED regression fix for n900. * tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config ARM: mach-omap2: board-generic: fix undefined symbol ARM: dts: Fix pinctrl mask for omap3 ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT Signed-off-by: Olof Johansson <olof@lixom.net>
OpenPOWER on IntegriCloud