hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/mfd/asic3.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * driver/mfd/asic3.c
34 *
45 * Compaq ASIC3 support.
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 version 2 as
8
- * published by the Free Software Foundation.
96 *
107 * Copyright 2001 Compaq Computer Corporation.
118 * Copyright 2004-2005 Phil Blundell
....@@ -13,13 +10,12 @@
1310 *
1411 * Authors: Phil Blundell <pb@handhelds.org>,
1512 * Samuel Ortiz <sameo@openedhand.com>
16
- *
1713 */
1814
1915 #include <linux/kernel.h>
2016 #include <linux/delay.h>
2117 #include <linux/irq.h>
22
-#include <linux/gpio.h>
18
+#include <linux/gpio/driver.h>
2319 #include <linux/export.h>
2420 #include <linux/io.h>
2521 #include <linux/slab.h>
....@@ -918,14 +914,14 @@
918914 ret = mfd_add_devices(&pdev->dev, pdev->id,
919915 &asic3_cell_ds1wm, 1, mem, asic->irq_base, NULL);
920916 if (ret < 0)
921
- goto out;
917
+ goto out_unmap;
922918 }
923919
924920 if (mem_sdio && (irq >= 0)) {
925921 ret = mfd_add_devices(&pdev->dev, pdev->id,
926922 &asic3_cell_mmc, 1, mem_sdio, irq, NULL);
927923 if (ret < 0)
928
- goto out;
924
+ goto out_unmap;
929925 }
930926
931927 ret = 0;
....@@ -939,8 +935,12 @@
939935 ret = mfd_add_devices(&pdev->dev, 0,
940936 asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0, NULL);
941937 }
938
+ return ret;
942939
943
- out:
940
+out_unmap:
941
+ if (asic->tmio_cnf)
942
+ iounmap(asic->tmio_cnf);
943
+out:
944944 return ret;
945945 }
946946