hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/clocksource/em_sti.c
....@@ -1,20 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Emma Mobile Timer Support - STI
34 *
45 * Copyright (C) 2012 Magnus Damm
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
186 */
197
208 #include <linux/init.h>
....@@ -291,9 +279,7 @@
291279 static int em_sti_probe(struct platform_device *pdev)
292280 {
293281 struct em_sti_priv *p;
294
- struct resource *res;
295
- int irq;
296
- int ret;
282
+ int irq, ret;
297283
298284 p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);
299285 if (p == NULL)
....@@ -303,14 +289,11 @@
303289 platform_set_drvdata(pdev, p);
304290
305291 irq = platform_get_irq(pdev, 0);
306
- if (irq < 0) {
307
- dev_err(&pdev->dev, "failed to get irq\n");
292
+ if (irq < 0)
308293 return irq;
309
- }
310294
311295 /* map memory, let base point to the STI instance */
312
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
313
- p->base = devm_ioremap_resource(&pdev->dev, res);
296
+ p->base = devm_platform_ioremap_resource(pdev, 0);
314297 if (IS_ERR(p->base))
315298 return PTR_ERR(p->base);
316299