diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2018-01-19 02:09:57 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-01-19 02:09:57 +0100 |
commit | d27998185da8fbdc35911307ae13518d168778d7 (patch) | |
tree | 4c5a99fd7cff7c9da1f858fdfccf8dc1cc6c597b /drivers/char/ipmi/bt-bmc.c | |
parent | KVM: PPC: Book3S HV: Allow HPT and radix on the same core for POWER9 v2.2 (diff) | |
parent | KVM: PPC: Book3S HV: Improve handling of debug-trigger HMIs on POWER9 (diff) | |
download | linux-d27998185da8fbdc35911307ae13518d168778d7.tar.xz linux-d27998185da8fbdc35911307ae13518d168778d7.zip |
Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next
This merges in the ppc-kvm topic branch of the powerpc tree to get
two patches which are prerequisites for the following patch series,
plus another patch which touches both powerpc and KVM code.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'drivers/char/ipmi/bt-bmc.c')
-rw-r--r-- | drivers/char/ipmi/bt-bmc.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c index 70d434bc1cbf..6edfaa72b98b 100644 --- a/drivers/char/ipmi/bt-bmc.c +++ b/drivers/char/ipmi/bt-bmc.c @@ -204,9 +204,6 @@ static ssize_t bt_bmc_read(struct file *file, char __user *buf, ssize_t ret = 0; ssize_t nread; - if (!access_ok(VERIFY_WRITE, buf, count)) - return -EFAULT; - WARN_ON(*ppos); if (wait_event_interruptible(bt_bmc->queue, @@ -277,9 +274,6 @@ static ssize_t bt_bmc_write(struct file *file, const char __user *buf, if (count < 5) return -EINVAL; - if (!access_ok(VERIFY_READ, buf, count)) - return -EFAULT; - WARN_ON(*ppos); /* @@ -373,9 +367,9 @@ static const struct file_operations bt_bmc_fops = { .unlocked_ioctl = bt_bmc_ioctl, }; -static void poll_timer(unsigned long data) +static void poll_timer(struct timer_list *t) { - struct bt_bmc *bt_bmc = (void *)data; + struct bt_bmc *bt_bmc = from_timer(bt_bmc, t, poll_timer); bt_bmc->poll_timer.expires += msecs_to_jiffies(500); wake_up(&bt_bmc->queue); @@ -493,8 +487,7 @@ static int bt_bmc_probe(struct platform_device *pdev) dev_info(dev, "Using IRQ %d\n", bt_bmc->irq); } else { dev_info(dev, "No IRQ; using timer\n"); - setup_timer(&bt_bmc->poll_timer, poll_timer, - (unsigned long)bt_bmc); + timer_setup(&bt_bmc->poll_timer, poll_timer, 0); bt_bmc->poll_timer.expires = jiffies + msecs_to_jiffies(10); add_timer(&bt_bmc->poll_timer); } |