diff options
Diffstat (limited to 'drivers/mailbox/mailbox-altera.c')
| -rw-r--r-- | drivers/mailbox/mailbox-altera.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c index 397e25ddae29..17278c2571d3 100644 --- a/drivers/mailbox/mailbox-altera.c +++ b/drivers/mailbox/mailbox-altera.c @@ -1,17 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright Altera Corporation (C) 2013-2014. All rights reserved - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see <http://www.gnu.org/licenses/>. */ #include <linux/device.h> @@ -141,7 +130,7 @@ static void altera_mbox_rx_data(struct mbox_chan *chan) static void altera_mbox_poll_rx(struct timer_list *t) { - struct altera_mbox *mbox = from_timer(mbox, t, rxpoll_timer); + struct altera_mbox *mbox = timer_container_of(mbox, t, rxpoll_timer); altera_mbox_rx_data(mbox->chan); @@ -281,7 +270,7 @@ static void altera_mbox_shutdown(struct mbox_chan *chan) writel_relaxed(~0, mbox->mbox_base + MAILBOX_INTMASK_REG); free_irq(mbox->irq, chan); } else if (!mbox->is_sender) { - del_timer_sync(&mbox->rxpoll_timer); + timer_delete_sync(&mbox->rxpoll_timer); } } @@ -296,7 +285,6 @@ static const struct mbox_chan_ops altera_mbox_ops = { static int altera_mbox_probe(struct platform_device *pdev) { struct altera_mbox *mbox; - struct resource *regs; struct mbox_chan *chans; int ret; @@ -310,9 +298,7 @@ static int altera_mbox_probe(struct platform_device *pdev) if (!chans) return -ENOMEM; - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - mbox->mbox_base = devm_ioremap_resource(&pdev->dev, regs); + mbox->mbox_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mbox->mbox_base)) return PTR_ERR(mbox->mbox_base); |
