linux/drivers
Stefan Agner 8a5d1e374b can: mcp251x: fix resume when device is down
commit 25b401c181 upstream.

If a valid power regulator or a dummy regulator is used (which
happens to be the case when no regulator is specified), restart_work
is queued no matter whether the device was running or not at suspend
time. Since work queues get initialized in the ndo_open callback,
resuming leads to a NULL pointer exception.

Reverse exactly the steps executed at suspend time:
- Enable the power regulator in any case
- Enable the transceiver regulator if the device was running, even in
  case we have a power regulator
- Queue restart_work only in case the device was running

Fixes: bf66f3736a ("can: mcp251x: Move to threaded interrupts instead of workqueues.")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2015-08-10 12:21:51 -07:00
..
accessibility printk: move braille console support into separate braille.[ch] files 2013-07-31 14:41:03 -07:00
acpi ACPI / PCI: Fix regressions caused by resource_size_t overflow with 32-bit kernel 2015-08-03 09:29:14 -07:00
amba ARM: 8334/1: amba: tegra-ahb: detect and correct bogus base address 2015-04-02 10:03:55 +01:00
android android: binder: fix binder mmap failures 2015-03-01 18:43:51 -08:00
ata libata: Fix regression when the NCQ Send and Receive log page is absent 2015-08-03 09:29:11 -07:00
atm drivers: atm: nicstar: remove ifdef'd out skb destructors 2015-03-10 13:34:53 -04:00
auxdisplay framebuffer: Use fb_<level> 2013-10-29 12:53:07 +02:00
base Fix firmware loader uevent buffer NULL pointer dereference 2015-08-03 09:29:19 -07:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-04-17 15:50:54 -04:00
block rbd: use GFP_NOIO in rbd_obj_request_create() 2015-08-03 09:29:18 -07:00
bluetooth Bluetooth: btbcm: allow btbcm_read_verbose_config to fail on Apple 2015-08-03 09:28:58 -07:00
bus bus: arm-ccn: Fix node->XP config conversion 2015-08-03 09:29:07 -07:00
cdrom block,scsi: fixup blk_get_request dead queue scenarios 2014-08-28 10:03:46 -06:00
char agp/intel: Fix typo in needs_ilk_vtd_wa() 2015-08-03 09:29:18 -07:00
clk clk: qcom: Use parent rate when set rate to pixel RCG clock 2015-08-03 09:29:17 -07:00
clocksource clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier 2015-08-03 09:29:16 -07:00
connector kconfig: use bool instead of boolean for type definition attributes 2015-01-07 13:08:04 +01:00
cpufreq intel_pstate: set BYT MSR with wrmsrl_on_cpu() 2015-07-10 09:49:34 -07:00
cpuidle tick/idle/powerpc: Do not register idle states with CPUIDLE_FLAG_TIMER_STOP set in periodic mode 2015-07-10 09:49:35 -07:00
crypto Revert "crypto: talitos - convert to use be16_add_cpu()" 2015-07-10 09:49:33 -07:00
dca dca: convert to idr_alloc() 2013-02-27 19:10:15 -08:00
devfreq PM / devfreq: tegra: Register governor on module init 2015-03-31 13:17:15 +09:00
dio m68k: don't export static inline functions 2009-12-06 11:18:28 +01:00
dma dmaengine: mv_xor: bug fix for racing condition in descriptors cleanup 2015-08-03 09:29:12 -07:00
dma-buf dma-buf: cleanup dma_buf_export() to make it easily extensible 2015-04-21 14:47:16 +05:30
edac EDAC, octeon: Fix broken build due to model helper renames 2015-08-03 09:29:18 -07:00
eisa Revert "EISA: Initialize device before its resources" 2014-01-17 14:57:29 -07:00
extcon extcon: usb-gpio: register extcon device before IRQ registration 2015-04-27 11:06:05 +09:00
firewire Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
firmware firmware: dmi_scan: Only honor end-of-table for 64-bit tables 2015-08-03 09:29:15 -07:00
fmc Merge 3.14-rc5 into char-misc-next 2014-03-02 19:53:09 -08:00
gpio gpio: rcar: Check for irq_set_irq_wake() failures 2015-07-21 10:10:01 -07:00
gpu drm: Stop resetting connector state to unknown 2015-08-03 09:29:10 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2015-05-21 17:23:11 -07:00
hsi HSI: cmt_speech: fix error return code 2015-04-05 14:45:27 +02:00
hv Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case 2015-04-03 16:20:12 +02:00
hwmon hwmon: (nct7802) fix visibility of temp3 2015-08-03 09:29:13 -07:00
hwspinlock hwspinlock: drop owner assignment from platform_drivers 2014-10-20 16:20:37 +02:00
hwtracing/coresight Char/Misc driver patches for 4.1-rc1 2015-04-21 09:42:58 -07:00
i2c i2c: use parent adapter quirks in mux 2015-08-03 09:29:01 -07:00
ide Merge branch 'for-4.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-05-11 10:54:20 -07:00
idle Power management and ACPI updates for v4.1-rc1 2015-04-14 20:21:54 -07:00
iio iio: adc: at91_adc: allow to use full range of startup time 2015-08-03 09:29:02 -07:00
infiniband RDMA/ocrdma: fix double free on pd 2015-08-03 09:29:15 -07:00
input Revert "Input: synaptics - allocate 3 slots to keep stability in image sensors" 2015-08-10 12:21:50 -07:00
iommu iommu/amd: Handle large pages correctly in free_pagetable 2015-07-10 09:49:33 -07:00
ipack ipoctal: clear break interrupt as soon as it occurs 2014-09-23 23:26:42 -07:00
irqchip Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-06-14 15:38:57 -10:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-04-15 09:00:47 -07:00
leds leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger 2015-07-21 10:10:05 -07:00
lguest lguest: fix out-by-one error in address checking. 2015-05-27 09:57:21 -07:00
macintosh Merge branch 'next-remove-ldst' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc into next 2015-04-07 13:25:14 +10:00
mailbox mailbox: arm_mhu: add driver for ARM MHU controller 2015-03-17 11:12:01 +05:30
mcb mcb: request_mem_region() returns NULL on error 2015-04-03 16:15:30 +02:00
md md: fix a build warning 2015-08-03 09:29:13 -07:00
media cx24116: fix a buffer overflow when checking userspace params 2015-08-03 09:29:03 -07:00
memory ARM: SoC driver updates for v4.1 2015-04-22 09:18:17 -07:00
memstick memstick: mspro_block: add missing curly braces 2015-04-17 09:04:09 -04:00
message i2o: move to staging 2015-02-03 15:58:39 -08:00
mfd mfd: da9052: Fix broken regulator probe 2015-05-27 13:34:15 +01:00
misc cxl: Check if afu is not null in cxl_slbia 2015-08-10 12:21:50 -07:00
mmc mmc: sdhci: Restore behavior while creating OCR mask 2015-08-03 09:29:15 -07:00
mtd mtd: dc21285: use raw spinlock functions for nw_gpio_lock 2015-07-21 10:10:05 -07:00
net can: mcp251x: fix resume when device is down 2015-08-10 12:21:51 -07:00
nfc NFC: st21nfcb: remove st21nfcb_nci_i2c_disable 2015-08-03 09:29:01 -07:00
ntb ntb: initialize max_mw for Atom before using it 2015-06-11 09:27:24 -04:00
nubus nubus: Remove superfluous interrupt disable/restore 2014-10-27 11:03:19 +01:00
of of: return NUMA_NO_NODE from fallback of_node_to_nid() 2015-08-03 09:29:16 -07:00
oprofile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
parisc parisc: %pf is only for function pointers 2015-04-24 13:45:54 +02:00
parport parport: parport_atari: Remove obsolete IRQ_TYPE_SLOW 2015-01-15 13:44:50 +01:00
pci PCI: pciehp: Wait for hotplug command completion where necessary 2015-07-21 10:10:05 -07:00
pcmcia Disable write buffering on Toshiba ToPIC95 2015-07-21 10:10:01 -07:00
phy phy: berlin-usb: fix divider for BG2CD 2015-08-03 09:29:05 -07:00
pinctrl pinctrl: mvebu: armada-xp: fix functions of MPP48 2015-08-03 09:28:58 -07:00
platform dell-laptop: Fix allocating & freeing SMI buffer page 2015-08-03 09:29:16 -07:00
pnp ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage 2015-08-03 09:29:14 -07:00
power power_supply: Fix possible NULL pointer dereference on early uevent 2015-07-21 10:10:03 -07:00
powercap powercap / RAPL: Add support for Intel Skylake processors 2015-04-15 23:06:16 +02:00
pps pps: clients: drop owner assignment from platform_drivers 2014-10-20 16:21:28 +02:00
ps3 ps3: Fix trivial typos in comment and debug message 2015-03-26 15:23:17 +11:00
ptp ptp: remove 32 bit get/set methods. 2015-03-31 12:01:19 -04:00
pwm pwm: img: Impose upper and lower timebase steps value 2015-05-19 16:07:40 +02:00
rapidio Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2015-02-18 08:49:20 -08:00
ras trace, RAS: Add eMCA trace event interface 2014-06-25 13:26:47 -07:00
regulator regulator: core: fix constraints output buffer 2015-07-21 10:10:04 -07:00
remoteproc remoteproc: add IOMMU hardware capability flag 2015-03-12 10:43:26 +02:00
reset reset: sunxi: fix spinlock initialization 2015-01-16 19:11:31 -08:00
rpmsg virtio_rpmsg: set DRIVER_OK before using device 2015-03-13 15:55:42 +10:30
rtc rtc: snvs: fix wakealarm by call enable_irq_wake earlier 2015-08-03 09:29:01 -07:00
s390 KVM: s390: virtio-ccw: don't overwrite config space values 2015-07-10 09:49:37 -07:00
sbus drivers/sbus/char/envctrl.c: ignore orderly_poweroff return value 2015-04-15 16:35:23 -07:00
scsi scsi_transport_srp: Fix a race condition 2015-07-21 10:10:04 -07:00
sfi SFI: fix compiler warnings 2014-12-03 18:49:20 -05:00
sh drivers: sh: Remove test for now unsupported sh7372 2015-04-27 13:08:14 +09:00
sn Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
soc soc: mediatek: Add compile dependency to pmic-wrapper 2015-05-27 16:27:05 +02:00
spi spi: orion: Fix maximum baud rates for Armada 370/XP 2015-07-21 10:10:04 -07:00
spmi spmi: pmic_arb: remove ARM build time dependency 2015-04-03 16:15:30 +02:00
ssb SSB: Fix handling of ssb_pmu_get_alp_clock() 2015-06-09 16:38:06 +02:00
staging staging: comedi: cb_pcimdas: fix handlers for DI and DO subdevices 2015-08-03 09:28:59 -07:00
target target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
tc TC: Error handling clean-ups 2014-11-24 07:45:25 +01:00
thermal Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into for-rc 2015-05-19 08:12:27 +08:00
thunderbolt thunderbolt: Clear hops before overwriting 2014-08-26 14:54:48 -07:00
tty tty: remove platform_sysrq_reset_seq 2015-08-03 09:29:15 -07:00
uio Revert "uio: constify of_device_id array" 2015-04-03 16:04:21 +02:00
usb usb: xhci: Bugfix for NULL pointer deference in xhci_endpoint_init() function 2015-08-03 09:29:06 -07:00
uwb uwb: Remove umc bus legacy suspend/resume support 2015-03-18 17:27:03 +01:00
vfio vfio: Fix runaway interruptible timeout 2015-05-01 16:31:41 -06:00
vhost target: Fix se_tpg_tfo->tf_subsys regression + remove tf_subsystem 2015-05-30 18:04:20 -07:00
video video: mxsfb: Make sure axi clock is enabled when accessing registers 2015-07-21 10:10:05 -07:00
virt drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
virtio virtio_pci: Clear stale cpumask when setting irq affinity 2015-06-04 14:47:49 +02:00
vlynq drivers/vlynq/vlynq.c: fix another resource size off by 1 error 2014-01-23 16:36:55 -08:00
vme vme: tsi148: Master windows support USERx and CR/CSR accesses, not slaves 2015-03-06 17:03:22 -08:00
w1 w1_therm reference count family data 2015-08-03 09:29:11 -07:00
watchdog watchdog: omap: assert the counter being stopped before reprogramming 2015-08-03 09:29:16 -07:00
xen xen/events: don't bind non-percpu VIRQs with percpu chip 2015-05-19 19:55:36 +01:00
zorro zorro: drop owner assignment from platform_drivers 2014-10-20 16:21:57 +02:00
Kconfig i2o: move to staging 2015-02-03 15:58:39 -08:00
Makefile coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00