1. 01 Apr, 2012 5 commits
    • Guenter Roeck's avatar
      hwmon: (adm1031) Fix compiler warning · ce15a81d
      Guenter Roeck authored
      Some configurations produce the following compile warning:
      
      drivers/hwmon/adm1031.c: In function 'set_fan_auto_channel':
      drivers/hwmon/adm1031.c:292: warning: 'reg' may be used uninitialized in this function
      
      While this is a false positive, it can easily be fixed by overloading the return
      value from get_fan_auto_nearest with both register value and error return code
      (the register value is never negative). Coincidentially, that also reduces
      module size by a few bytes.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      ce15a81d
    • Guenter Roeck's avatar
      hwmon: (f75375s) Fix warning message seen in some configurations · 6394011d
      Guenter Roeck authored
      In some configurations, BUG() does not result in an endless loop but returns to
      the caller. This results in the following compiler warning:
      
      drivers/hwmon/f75375s.c: In function 'duty_mode_enabled':
      drivers/hwmon/f75375s.c:280: warning: control reaches end of non-void function
      drivers/hwmon/f75375s.c: In function 'auto_mode_enabled':
      drivers/hwmon/f75375s.c:295: warning: control reaches end of non-void function
      
      Fix the warning by returning something sensible after BUG().
      
      Cc: Nikolaus Schulz <schulz@macnetix.de>
      Cc: Riku Voipio <riku.voipio@iki.fi>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      6394011d
    • Mark Brown's avatar
      hwmon: (max6639) Convert to dev_pm_ops · 52f30f77
      Mark Brown authored
      The I2C specific PM operations have been deprecated and printing a
      warning on boot for over a year now.
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      [guenter.roeck@ericsson.com: Added missing #ifdef around pm functions]
      Cc: stable@vger.kernel.org # 3.0+
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      52f30f77
    • Guenter Roeck's avatar
      hwmon: (sht15) Fix Kconfig dependencies · be45d422
      Guenter Roeck authored
      sht15 depends on GPIOLIB, not on GENERIC_GPIO.
      
      This fixes the following build error, seen if GPIOLIB is not defined:
      
      src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_direction_input': => 293:2
      src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_direction_output': => 216:2
      src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_free': => 1000:2
      src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_get_value': => 296:2
      src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_request': => 946:2
      src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_set_value': => 218:2
      src/drivers/hwmon/sht15.c: error: implicit declaration of function 'gpio_to_irq': => 514:2
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      be45d422
    • Guenter Roeck's avatar
      hwmon: (gpio-fan) Fix Kconfig dependencies · c1a12602
      Guenter Roeck authored
      gpio-fan depends on GPIOLIB, not on GENERIC_GPIO.
      
      This fixes the following build error, seen if GPIOLIB is not defined:
      
      src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_direction_output': => 372:3
      src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_free': => 130:2
      src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_get_value': => 79:2
      src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_request': => 98:2
      src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_set_value': => 156:3
      src/drivers/hwmon/gpio-fan.c: error: implicit declaration of function 'gpio_to_irq': => 114:2
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      Acked-by: default avatarSimon Guinot <sguinot@lacie.com>
      c1a12602
  2. 31 Mar, 2012 35 commits