diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-11-07 11:59:40 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-11-07 11:59:40 +0100 |
commit | 1c10bbee8cf7c8df4e5d9e8ccc9754b200f625ff (patch) | |
tree | 3fb75d197d16d63878fdb4a478e9f6a555a95f80 /drivers/mailbox/mailbox-altera.c | |
parent | c7c2f3d9e86c2f09a514247d1623f00850125636 (diff) | |
parent | 5ea22086ed42bef8dde93f45a42a3ace486eb788 (diff) | |
download | linux-1c10bbee8cf7c8df4e5d9e8ccc9754b200f625ff.tar.gz linux-1c10bbee8cf7c8df4e5d9e8ccc9754b200f625ff.tar.xz |
Merge tag 'timers-conversion-next4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/core
Pull the 4th timer conversion batch from Kees Cook
- A couple fixes for less common build configurations
- More stragglers that have either been reviewed or gone
long enough on list
Diffstat (limited to 'drivers/mailbox/mailbox-altera.c')
-rw-r--r-- | drivers/mailbox/mailbox-altera.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c index bb682c926b0a..bcb29df9549e 100644 --- a/drivers/mailbox/mailbox-altera.c +++ b/drivers/mailbox/mailbox-altera.c @@ -57,6 +57,7 @@ struct altera_mbox { /* If the controller supports only RX polling mode */ struct timer_list rxpoll_timer; + struct mbox_chan *chan; }; static struct altera_mbox *mbox_chan_to_altera_mbox(struct mbox_chan *chan) @@ -138,12 +139,11 @@ static void altera_mbox_rx_data(struct mbox_chan *chan) } } -static void altera_mbox_poll_rx(unsigned long data) +static void altera_mbox_poll_rx(struct timer_list *t) { - struct mbox_chan *chan = (struct mbox_chan *)data; - struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan); + struct altera_mbox *mbox = from_timer(mbox, t, rxpoll_timer); - altera_mbox_rx_data(chan); + altera_mbox_rx_data(mbox->chan); mod_timer(&mbox->rxpoll_timer, jiffies + msecs_to_jiffies(MBOX_POLLING_MS)); @@ -206,8 +206,8 @@ static int altera_mbox_startup_receiver(struct mbox_chan *chan) polling: /* Setup polling timer */ - setup_timer(&mbox->rxpoll_timer, altera_mbox_poll_rx, - (unsigned long)chan); + mbox->chan = chan; + timer_setup(&mbox->rxpoll_timer, altera_mbox_poll_rx, 0); mod_timer(&mbox->rxpoll_timer, jiffies + msecs_to_jiffies(MBOX_POLLING_MS)); |