.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2005-2008 Freescale Semiconductor, Inc. All Rights Reserved. |
---|
3 | 4 | * Copyright 2008 Luotao Fu, kernel@pengutronix.de |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or |
---|
6 | | - * modify it under the terms of the GNU General Public License |
---|
7 | | - * as published by the Free Software Foundation; either version 2 |
---|
8 | | - * of the License, or (at your option) any later version. |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | 5 | */ |
---|
14 | 6 | |
---|
15 | 7 | #include <linux/clk.h> |
---|
.. | .. |
---|
100 | 92 | { |
---|
101 | 93 | struct mxc_w1_device *mdev; |
---|
102 | 94 | unsigned long clkrate; |
---|
103 | | - struct resource *res; |
---|
104 | 95 | unsigned int clkdiv; |
---|
105 | 96 | int err; |
---|
106 | 97 | |
---|
.. | .. |
---|
128 | 119 | dev_warn(&pdev->dev, |
---|
129 | 120 | "Incorrect time base frequency %lu Hz\n", clkrate); |
---|
130 | 121 | |
---|
131 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
132 | | - mdev->regs = devm_ioremap_resource(&pdev->dev, res); |
---|
| 122 | + mdev->regs = devm_platform_ioremap_resource(pdev, 0); |
---|
133 | 123 | if (IS_ERR(mdev->regs)) { |
---|
134 | 124 | err = PTR_ERR(mdev->regs); |
---|
135 | 125 | goto out_disable_clk; |
---|