.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * driver/mfd/asic3.c |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
9 | 6 | * |
---|
10 | 7 | * Copyright 2001 Compaq Computer Corporation. |
---|
11 | 8 | * Copyright 2004-2005 Phil Blundell |
---|
.. | .. |
---|
13 | 10 | * |
---|
14 | 11 | * Authors: Phil Blundell <pb@handhelds.org>, |
---|
15 | 12 | * Samuel Ortiz <sameo@openedhand.com> |
---|
16 | | - * |
---|
17 | 13 | */ |
---|
18 | 14 | |
---|
19 | 15 | #include <linux/kernel.h> |
---|
20 | 16 | #include <linux/delay.h> |
---|
21 | 17 | #include <linux/irq.h> |
---|
22 | | -#include <linux/gpio.h> |
---|
| 18 | +#include <linux/gpio/driver.h> |
---|
23 | 19 | #include <linux/export.h> |
---|
24 | 20 | #include <linux/io.h> |
---|
25 | 21 | #include <linux/slab.h> |
---|
.. | .. |
---|
918 | 914 | ret = mfd_add_devices(&pdev->dev, pdev->id, |
---|
919 | 915 | &asic3_cell_ds1wm, 1, mem, asic->irq_base, NULL); |
---|
920 | 916 | if (ret < 0) |
---|
921 | | - goto out; |
---|
| 917 | + goto out_unmap; |
---|
922 | 918 | } |
---|
923 | 919 | |
---|
924 | 920 | if (mem_sdio && (irq >= 0)) { |
---|
925 | 921 | ret = mfd_add_devices(&pdev->dev, pdev->id, |
---|
926 | 922 | &asic3_cell_mmc, 1, mem_sdio, irq, NULL); |
---|
927 | 923 | if (ret < 0) |
---|
928 | | - goto out; |
---|
| 924 | + goto out_unmap; |
---|
929 | 925 | } |
---|
930 | 926 | |
---|
931 | 927 | ret = 0; |
---|
.. | .. |
---|
939 | 935 | ret = mfd_add_devices(&pdev->dev, 0, |
---|
940 | 936 | asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0, NULL); |
---|
941 | 937 | } |
---|
| 938 | + return ret; |
---|
942 | 939 | |
---|
943 | | - out: |
---|
| 940 | +out_unmap: |
---|
| 941 | + if (asic->tmio_cnf) |
---|
| 942 | + iounmap(asic->tmio_cnf); |
---|
| 943 | +out: |
---|
944 | 944 | return ret; |
---|
945 | 945 | } |
---|
946 | 946 | |
---|