hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/ipaq-micro.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Compaq iPAQ h3xxx Atmel microcontroller companion support
34 *
....@@ -8,10 +9,6 @@
89 * Author : Alessandro Gardich <gremlin@gremlin.it>
910 * Author : Dmitry Artamonow <mad_soft@inbox.ru>
1011 * Author : Linus Walleij <linus.walleij@linaro.org>
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License version 2 as
14
- * published by the Free Software Foundation.
1512 */
1613
1714 #include <linux/module.h>
....@@ -399,18 +396,14 @@
399396 if (IS_ERR(micro->base))
400397 return PTR_ERR(micro->base);
401398
402
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
403
- if (!res)
404
- return -EINVAL;
405
-
406
- micro->sdlc = devm_ioremap_resource(&pdev->dev, res);
399
+ micro->sdlc = devm_platform_ioremap_resource(pdev, 1);
407400 if (IS_ERR(micro->sdlc))
408401 return PTR_ERR(micro->sdlc);
409402
410403 micro_reset_comm(micro);
411404
412405 irq = platform_get_irq(pdev, 0);
413
- if (!irq)
406
+ if (irq < 0)
414407 return -EINVAL;
415408 ret = devm_request_irq(&pdev->dev, irq, micro_serial_isr,
416409 IRQF_SHARED, "ipaq-micro",