hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/w1/masters/mxc_w1.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2005-2008 Freescale Semiconductor, Inc. All Rights Reserved.
34 * 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.
135 */
146
157 #include <linux/clk.h>
....@@ -100,7 +92,6 @@
10092 {
10193 struct mxc_w1_device *mdev;
10294 unsigned long clkrate;
103
- struct resource *res;
10495 unsigned int clkdiv;
10596 int err;
10697
....@@ -128,8 +119,7 @@
128119 dev_warn(&pdev->dev,
129120 "Incorrect time base frequency %lu Hz\n", clkrate);
130121
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);
133123 if (IS_ERR(mdev->regs)) {
134124 err = PTR_ERR(mdev->regs);
135125 goto out_disable_clk;