aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2017-12-27 13:38:06 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2017-12-27 13:38:06 +0100
commitcb7518e6167c2b709ca6d902168b2937016c0c94 (patch)
tree369a60b50c0bfd4c82ad97099d7345f0316c2789 /drivers/rtc
parent2506378791654badf0ade120478ee70439c410e3 (diff)
parent2df397931072ff4e66f9e42ae1f1630c03513ce7 (diff)
Merge 4.9.72 into android-4.9
Changes in 4.9.72 cxl: Check if vphb exists before iterating over AFU devices arm64: Initialise high_memory global variable earlier ALSA: hda - add support for docking station for HP 820 G2 ALSA: hda - add support for docking station for HP 840 G3 kvm: fix usage of uninit spinlock in avic_vm_destroy() HID: corsair: support for K65-K70 Rapidfire and Scimitar Pro RGB HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e support to hid-corsair arm: kprobes: Fix the return address of multiple kretprobes arm: kprobes: Align stack to 8-bytes in test code nvme-loop: handle cpu unplug when re-establishing the controller cpuidle: Validate cpu_dev in cpuidle_add_sysfs() r8152: fix the list rx_done may be used without initialization crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex vsock: track pkt owner vsock vhost-vsock: add pkt cancel capability vsock: cancel packets when failing to connect sch_dsmark: fix invalid skb_cow() usage bna: integer overflow bug in debugfs sctp: out_qlen should be updated when pruning unsent queue net: qmi_wwan: Add USB IDs for MDM6600 modem on Motorola Droid 4 hwmon: (max31790) Set correct PWM value usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed usb: gadget: udc: remove pointer dereference after free netfilter: nfnl_cthelper: fix runtime expectation policy updates netfilter: nfnl_cthelper: Fix memory leak iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5 r8152: fix the rx early size of RTL8153 tipc: fix nametbl deadlock at tipc_nametbl_unsubscribe inet: frag: release spinlock before calling icmp_send() pinctrl: st: add irq_request/release_resources callbacks scsi: lpfc: Fix PT2PT PRLI reject kvm: vmx: Flush TLB when the APIC-access address changes KVM: x86: correct async page present tracepoint KVM: VMX: Fix enable VPID conditions ARM: dts: ti: fix PCI bus dtc warnings hwmon: (asus_atk0110) fix uninitialized data access HID: xinmo: fix for out of range for THT 2P arcade controller. ASoC: STI: Fix reader substream pointer set r8152: prevent the driver from transmitting packets with carrier off s390/qeth: size calculation outbound buffers s390/qeth: no ETH header for outbound AF_IUCV bna: avoid writing uninitialized data into hw registers i40iw: Receive netdev events post INET_NOTIFIER state IB/core: Protect against self-requeue of a cq work item infiniband: Fix alignment of mmap cookies to support VIPT caching nbd: set queue timeout properly net: Do not allow negative values for busy_read and busy_poll sysctl interfaces IB/rxe: double free on error IB/rxe: increment msn only when completing a request i40e: Do not enable NAPI on q_vectors that have no rings RDMA/iser: Fix possible mr leak on device removal event irda: vlsi_ir: fix check for DMA mapping errors netfilter: nfnl_cthelper: fix a race when walk the nf_ct_helper_hash table netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register ARM: dts: am335x-evmsk: adjust mmc2 param to allow suspend cpufreq: Fix creation of symbolic links to policy directories net: ipconfig: fix ic_close_devs() use-after-free KVM: pci-assign: do not map smm memory slot pages in vt-d page tables virtio-balloon: use actual number of stats for stats queue buffers virtio_balloon: prevent uninitialized variable use isdn: kcapi: avoid uninitialized data net: moxa: fix TX overrun memory leak xhci: plat: Register shutdown for xhci_plat netfilter: nfnetlink_queue: fix secctx memory leak Btrfs: fix an integer overflow check ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory cpuidle: powernv: Pass correct drv->cpumask for registration bnxt_en: Fix NULL pointer dereference in reopen failure path backlight: pwm_bl: Fix overflow condition crypto: crypto4xx - increase context and scatter ring buffer elements rtc: pl031: make interrupt optional kvm, mm: account kvm related kmem slabs to kmemcg net: phy: at803x: Change error to EINVAL for invalid MAC PCI: Avoid bus reset if bridge itself is broken scsi: cxgb4i: fix Tx skb leak scsi: mpt3sas: Fix IO error occurs on pulling out a drive from RAID1 volume created on two SATA drive PCI: Create SR-IOV virtfn/physfn links before attaching driver PM / OPP: Move error message to debug level igb: check memory allocation failure ixgbe: fix use of uninitialized padding IB/rxe: check for allocation failure on elem PCI/AER: Report non-fatal errors only to the affected endpoint tracing: Exclude 'generic fields' from histograms ASoC: img-parallel-out: Add pm_runtime_get/put to set_fmt callback fm10k: fix mis-ordered parameters in declaration for .ndo_set_vf_bw scsi: lpfc: Fix secure firmware updates scsi: lpfc: PLOGI failures during NPIV testing vfio/pci: Virtualize Maximum Payload Size fm10k: ensure we process SM mbx when processing VF mbx net: ipv6: send NS for DAD when link operationally up staging: greybus: light: Release memory obtained by kasprintf clk: sunxi-ng: sun6i: Rename HDMI DDC clock to avoid name collision tcp: fix under-evaluated ssthresh in TCP Vegas rtc: set the alarm to the next expiring timer cpuidle: fix broadcast control when broadcast can not be entered thermal: hisilicon: Handle return value of clk_prepare_enable thermal/drivers/hisi: Fix missing interrupt enablement thermal/drivers/hisi: Fix kernel panic on alarm interrupt thermal/drivers/hisi: Simplify the temperature/step computation thermal/drivers/hisi: Fix multiple alarm interrupts firing MIPS: math-emu: Fix final emulation phase for certain instructions platform/x86: asus-wireless: send an EV_SYN/SYN_REPORT between state changes Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature" bpf: adjust insn_aux_data when patching insns bpf: fix branch pruning logic bpf: reject out-of-bounds stack pointer calculation bpf: fix incorrect sign extension in check_alu_op() sparc32: Export vac_cache_size to fix build error Linux 4.9.72 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/interface.c2
-rw-r--r--drivers/rtc/rtc-pl031.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 84a52db9b05f..6ebd42aad291 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -772,7 +772,7 @@ static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer)
}
timerqueue_add(&rtc->timerqueue, &timer->node);
- if (!next) {
+ if (!next || ktime_before(timer->node.expires, next->expires)) {
struct rtc_wkalrm alarm;
int err;
alarm.time = rtc_ktime_to_tm(timer->node.expires);
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index e1687e19c59f..a30f24cb6c83 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -308,7 +308,8 @@ static int pl031_remove(struct amba_device *adev)
dev_pm_clear_wake_irq(&adev->dev);
device_init_wakeup(&adev->dev, false);
- free_irq(adev->irq[0], ldata);
+ if (adev->irq[0])
+ free_irq(adev->irq[0], ldata);
rtc_device_unregister(ldata->rtc);
iounmap(ldata->base);
kfree(ldata);
@@ -381,12 +382,13 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
goto out_no_rtc;
}
- if (request_irq(adev->irq[0], pl031_interrupt,
- vendor->irqflags, "rtc-pl031", ldata)) {
- ret = -EIO;
- goto out_no_irq;
+ if (adev->irq[0]) {
+ ret = request_irq(adev->irq[0], pl031_interrupt,
+ vendor->irqflags, "rtc-pl031", ldata);
+ if (ret)
+ goto out_no_irq;
+ dev_pm_set_wake_irq(&adev->dev, adev->irq[0]);
}
- dev_pm_set_wake_irq(&adev->dev, adev->irq[0]);
return 0;
out_no_irq: