1. 02 4月, 2012 7 次提交
    • U
      hwmon: (w83627ehf) mark const init data with __initconst instead of __initdata · 6f7805a8
      Uwe Kleine-König 提交于
      As long as there is no other non-const variable marked __initdata in the
      same compilation unit it doesn't hurt. If there were one however
      compilation would fail with
      
      	error: $variablename causes a section type conflict
      
      because a section containing const variables is marked read only and so
      cannot contain non-const variables.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Guenter Roeck <guenter.roeck@ericsson.com>
      Cc: lm-sensors@lm-sensors.org
      Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      6f7805a8
    • K
      hwmon: (acpi_power_meter) fix lockdep spew due to non-static lock class · 31e354ee
      Kyle McMartin 提交于
      Similar to a30dcb4f which fixed asus_atk0110.ko, I recently received a
      bug report from someone hitting the same issue in acpi_power_meter.
      
      [   13.963168] power_meter ACPI000D:00: Found ACPI power meter.
      [   13.963900] BUG: key ffff8802161f3920 not in .data!
      [   13.963904] ------------[ cut here ]------------
      [   13.963915] WARNING: at kernel/lockdep.c:2986
      	lockdep_init_map+0x52f/0x560()
      
      So let's fix that up for them by statically declaring the
      lockdep_class_key.
      Signed-off-by: NKyle McMartin <kyle@redhat.com>
      Cc: stable@vger.kernel.org # 3.0+
      Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      31e354ee
    • G
      hwmon: (adm1031) Fix compiler warning · ce15a81d
      Guenter Roeck 提交于
      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: NGuenter Roeck <linux@roeck-us.net>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      ce15a81d
    • G
      hwmon: (f75375s) Fix warning message seen in some configurations · 6394011d
      Guenter Roeck 提交于
      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: NGuenter Roeck <linux@roeck-us.net>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
      6394011d
    • M
      hwmon: (max6639) Convert to dev_pm_ops · 52f30f77
      Mark Brown 提交于
      The I2C specific PM operations have been deprecated and printing a
      warning on boot for over a year now.
      Signed-off-by: NMark 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: NGuenter Roeck <guenter.roeck@ericsson.com>
      52f30f77
    • G
      hwmon: (sht15) Fix Kconfig dependencies · be45d422
      Guenter Roeck 提交于
      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: NGuenter Roeck <linux@roeck-us.net>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      be45d422
    • G
      hwmon: (gpio-fan) Fix Kconfig dependencies · c1a12602
      Guenter Roeck 提交于
      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: NGuenter Roeck <linux@roeck-us.net>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NSimon Guinot <sguinot@lacie.com>
      c1a12602
  2. 01 4月, 2012 33 次提交