remarkable-linux/drivers
Krzysztof Kozlowski 31f7dc7969 ACPI / battery: Fix doubly added battery on system suspend
Commit 297d716f62 ("power_supply: Change ownership from driver to
core") inverted the logic in battery_notify().  As an effect already
present battery was re-added on each system suspend or hibernation.

    WARNING: CPU: 0 PID: 303 at ../fs/sysfs/dir.c:31 sysfs_warn_dup+0x68/0x80()
    sysfs: cannot create duplicate filename '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0C0A:00/power_supply/BAT0'
    CPU: 0 PID: 303 Comm: rtcwake Not tainted 4.0.0-ARCH-02621-g07e6253af953 #48
    Call Trace:
      sysfs_create_dir_ns+0x8d/0xa0
      kobject_add_internal+0xb6/0x370
      kobject_add+0x6f/0xd0
      device_add+0x120/0x6c0
      __power_supply_register+0x145/0x290
      power_supply_register_no_ws+0x10/0x20
      sysfs_add_battery+0x84/0xc5 [battery]
      battery_notify+0x45/0x6b [battery]
      notifier_call_chain+0x4f/0x80
      __blocking_notifier_call_chain+0x4b/0x70
      blocking_notifier_call_chain+0x16/0x20
      pm_notifier_call_chain+0x1a/0x40
      pm_suspend+0x3ed/0x4e0

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-By: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-14 09:03:33 -07:00
..
accessibility
acpi ACPI / battery: Fix doubly added battery on system suspend 2015-04-14 09:03:33 -07:00
amba
android
ata Merge branch 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-04-13 16:42:16 -07:00
atm
auxdisplay
base Driver core update for 4.1-rc1 2015-04-13 17:17:32 -07:00
bcma
block Merge branch 'linus' into irq/core to get the GIC updates which 2015-04-08 23:26:21 +02:00
bluetooth
bus
cdrom
char ipmi_ssif: Use interruptible completion for waiting in the thread 2015-04-10 20:51:42 -05:00
clk
clocksource ARM, clocksource/drivers: Provide read_boot_clock64() and read_persistent_clock64() and use them 2015-04-03 08:18:23 +02:00
connector
coresight
cpufreq cpufreq: Schedule work for the first-online CPU on resume 2015-04-03 12:59:47 +02:00
cpuidle Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-04-13 11:08:28 -07:00
crypto
dca
devfreq
dio
dma Staging driver patches for 4.1-rc1 2015-04-13 17:37:33 -07:00
dma-buf
edac
eisa
extcon
firewire
firmware Merge branch 'core-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-04-13 10:22:30 -07:00
fmc
gpio gpio: syscon: reduce message level when direction reg offset not in dt 2015-03-27 11:17:08 +01:00
gpu regulator: Updates for v4.1 2015-04-13 15:13:25 -07:00
hid power supply and reset changes for the v4.1 series 2015-04-13 15:21:34 -07:00
hsi HSI: cmt_speech: fix error return code 2015-04-05 14:45:27 +02:00
hv
hwmon hwmon: (pwm-fan) Update the duty cycle inorder to control the pwm-fan 2015-04-12 15:59:11 -07:00
hwspinlock
i2c
ide Merge branch 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-04-13 16:42:16 -07:00
idle intel_idle: Use explicit broadcast oneshot control function 2015-04-03 08:44:35 +02:00
iio Staging driver patches for 4.1-rc1 2015-04-13 17:37:33 -07:00
infiniband IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic 2015-04-02 09:53:59 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2015-04-06 14:10:08 -07:00
iommu PCI changes for the v4.1 merge window: 2015-04-13 15:45:47 -07:00
ipack
irqchip irqchip core change for v4.1 (round 3) 2015-04-11 11:17:28 +02:00
isdn
leds
lguest lguest: now needs PCI_DIRECT. 2015-04-01 10:29:05 -07:00
macintosh
mailbox
mcb
md md/raid0: fix bug with chunksize not a power of 2. 2015-04-10 15:36:31 +10:00
media [media] rtl28xxu: return success for unimplemented FE callback 2015-04-02 18:27:14 -03:00
memory
memstick
message
mfd power supply and reset changes for the v4.1 series 2015-04-13 15:21:34 -07:00
misc Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-04-13 13:16:36 -07:00
mmc mmc: sdhci-st: Update the quirks for this controller. 2015-04-10 12:55:40 +02:00
mtd Merge branch 'linus' into irq/core to get the GIC updates which 2015-04-08 23:26:21 +02:00
net net/mlx4_core: Fix error message deprecation for ConnectX-2 cards 2015-04-06 17:32:27 -04:00
nfc
ntb
nubus
of PCI changes for the v4.1 merge window: 2015-04-13 15:45:47 -07:00
oprofile
parisc
parport
pci PCI changes for the v4.1 merge window: 2015-04-13 15:45:47 -07:00
pcmcia
phy USB patches for 4.1-rc1 2015-04-13 17:07:21 -07:00
pinctrl
platform
pnp
power power: twl4030_madc_battery: Add missing MODULE_ALIAS 2015-04-06 19:39:57 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator Merge remote-tracking branch 'regulator/topic/wm8350' into regulator-next 2015-04-10 19:16:06 +01:00
remoteproc
reset
rpmsg
rtc time, drivers/rtc: Don't bother with rtc_resume() for the nonstop clocksource 2015-04-03 08:18:34 +02:00
s390
sbus
scsi Merge branch 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-04-13 16:42:16 -07:00
sfi
sh
sn
soc
spi Merge remote-tracking branches 'spi/topic/spidev' and 'spi/topic/spidev-test' into spi-next 2015-04-11 23:09:31 +01:00
spmi
ssb
staging Staging driver patches for 4.1-rc1 2015-04-13 17:37:33 -07:00
target iscsi target: fix oops when adding reject pdu 2015-04-10 12:33:55 -07:00
tc
thermal drivers: thermal: st: remove several sparse warnings 2015-04-07 13:43:28 -07:00
thunderbolt
tty Merge branch 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2015-04-13 16:19:18 -07:00
uio
usb USB patches for 4.1-rc1 2015-04-13 17:07:21 -07:00
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog watchdog: imgpdc: Fix default heartbeat 2015-03-27 08:47:50 +01:00
xen xen: regression fixes for 4.0-rc6 2015-04-02 13:53:53 -07:00
zorro
Kconfig
Makefile