diff options
author | Michal Simek <michal.simek@xilinx.com> | 2013-06-26 05:52:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-26 20:54:30 -0400 |
commit | 26dac3c49d56642b06c07c80a2184abbf510920f (patch) | |
tree | a3bae08b3d70c573b94bd744347dcfd78c2dd4e4 /drivers/uio | |
parent | b950ac1dabfcbf97b99f26fa75f86087e1960aef (diff) |
uio: Remove uio_pdrv and use uio_pdrv_genirq instead
The patch "UIO: fix uio_pdrv_genirq with device tree but no interrupt"
(sha1: e3a3c3a205554e564751cd9c0276b2af813d7a92)
add support to use this driver with no interrupts.
uio_pdrv_genirq also supports device-tree binding
which is not available in uio_pdrv.
That's why this uio_pdrv driver can be just removed.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Vitalii Demianets <vitas@nppfactor.kiev.ua>
Reviewed-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uio')
-rw-r--r-- | drivers/uio/Kconfig | 7 | ||||
-rw-r--r-- | drivers/uio/Makefile | 1 | ||||
-rw-r--r-- | drivers/uio/uio_pdrv.c | 113 |
3 files changed, 0 insertions, 121 deletions
diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig index 5295be0342c1..a81d16389a58 100644 --- a/drivers/uio/Kconfig +++ b/drivers/uio/Kconfig | |||
@@ -23,13 +23,6 @@ config UIO_CIF | |||
23 | To compile this driver as a module, choose M here: the module | 23 | To compile this driver as a module, choose M here: the module |
24 | will be called uio_cif. | 24 | will be called uio_cif. |
25 | 25 | ||
26 | config UIO_PDRV | ||
27 | tristate "Userspace I/O platform driver" | ||
28 | help | ||
29 | Generic platform driver for Userspace I/O devices. | ||
30 | |||
31 | If you don't know what to do here, say N. | ||
32 | |||
33 | config UIO_PDRV_GENIRQ | 26 | config UIO_PDRV_GENIRQ |
34 | tristate "Userspace I/O platform driver with generic IRQ handling" | 27 | tristate "Userspace I/O platform driver with generic IRQ handling" |
35 | help | 28 | help |
diff --git a/drivers/uio/Makefile b/drivers/uio/Makefile index b354c539507a..ea015a290127 100644 --- a/drivers/uio/Makefile +++ b/drivers/uio/Makefile | |||
@@ -1,6 +1,5 @@ | |||
1 | obj-$(CONFIG_UIO) += uio.o | 1 | obj-$(CONFIG_UIO) += uio.o |
2 | obj-$(CONFIG_UIO_CIF) += uio_cif.o | 2 | obj-$(CONFIG_UIO_CIF) += uio_cif.o |
3 | obj-$(CONFIG_UIO_PDRV) += uio_pdrv.o | ||
4 | obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o | 3 | obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o |
5 | obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o | 4 | obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o |
6 | obj-$(CONFIG_UIO_AEC) += uio_aec.o | 5 | obj-$(CONFIG_UIO_AEC) += uio_aec.o |
diff --git a/drivers/uio/uio_pdrv.c b/drivers/uio/uio_pdrv.c deleted file mode 100644 index 39be9e061700..000000000000 --- a/drivers/uio/uio_pdrv.c +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * drivers/uio/uio_pdrv.c | ||
3 | * | ||
4 | * Copyright (C) 2008 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/uio_driver.h> | ||
13 | #include <linux/stringify.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/slab.h> | ||
16 | |||
17 | #define DRIVER_NAME "uio_pdrv" | ||
18 | |||
19 | struct uio_platdata { | ||
20 | struct uio_info *uioinfo; | ||
21 | }; | ||
22 | |||
23 | static int uio_pdrv_probe(struct platform_device *pdev) | ||
24 | { | ||
25 | struct uio_info *uioinfo = pdev->dev.platform_data; | ||
26 | struct uio_platdata *pdata; | ||
27 | struct uio_mem *uiomem; | ||
28 | int ret = -ENODEV; | ||
29 | int i; | ||
30 | |||
31 | if (!uioinfo || !uioinfo->name || !uioinfo->version) { | ||
32 | dev_dbg(&pdev->dev, "%s: err_uioinfo\n", __func__); | ||
33 | goto err_uioinfo; | ||
34 | } | ||
35 | |||
36 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); | ||
37 | if (!pdata) { | ||
38 | ret = -ENOMEM; | ||
39 | dev_dbg(&pdev->dev, "%s: err_alloc_pdata\n", __func__); | ||
40 | goto err_alloc_pdata; | ||
41 | } | ||
42 | |||
43 | pdata->uioinfo = uioinfo; | ||
44 | |||
45 | uiomem = &uioinfo->mem[0]; | ||
46 | |||
47 | for (i = 0; i < pdev->num_resources; ++i) { | ||
48 | struct resource *r = &pdev->resource[i]; | ||
49 | |||
50 | if (r->flags != IORESOURCE_MEM) | ||
51 | continue; | ||
52 | |||
53 | if (uiomem >= &uioinfo->mem[MAX_UIO_MAPS]) { | ||
54 | dev_warn(&pdev->dev, "device has more than " | ||
55 | __stringify(MAX_UIO_MAPS) | ||
56 | " I/O memory resources.\n"); | ||
57 | break; | ||
58 | } | ||
59 | |||
60 | uiomem->memtype = UIO_MEM_PHYS; | ||
61 | uiomem->addr = r->start; | ||
62 | uiomem->size = resource_size(r); | ||
63 | uiomem->name = r->name; | ||
64 | ++uiomem; | ||
65 | } | ||
66 | |||
67 | while (uiomem < &uioinfo->mem[MAX_UIO_MAPS]) { | ||
68 | uiomem->size = 0; | ||
69 | ++uiomem; | ||
70 | } | ||
71 | |||
72 | pdata->uioinfo->priv = pdata; | ||
73 | |||
74 | ret = uio_register_device(&pdev->dev, pdata->uioinfo); | ||
75 | |||
76 | if (ret) { | ||
77 | kfree(pdata); | ||
78 | err_alloc_pdata: | ||
79 | err_uioinfo: | ||
80 | return ret; | ||
81 | } | ||
82 | |||
83 | platform_set_drvdata(pdev, pdata); | ||
84 | |||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | static int uio_pdrv_remove(struct platform_device *pdev) | ||
89 | { | ||
90 | struct uio_platdata *pdata = platform_get_drvdata(pdev); | ||
91 | |||
92 | uio_unregister_device(pdata->uioinfo); | ||
93 | |||
94 | kfree(pdata); | ||
95 | |||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | static struct platform_driver uio_pdrv = { | ||
100 | .probe = uio_pdrv_probe, | ||
101 | .remove = uio_pdrv_remove, | ||
102 | .driver = { | ||
103 | .name = DRIVER_NAME, | ||
104 | .owner = THIS_MODULE, | ||
105 | }, | ||
106 | }; | ||
107 | |||
108 | module_platform_driver(uio_pdrv); | ||
109 | |||
110 | MODULE_AUTHOR("Uwe Kleine-Koenig"); | ||
111 | MODULE_DESCRIPTION("Userspace I/O platform driver"); | ||
112 | MODULE_LICENSE("GPL v2"); | ||
113 | MODULE_ALIAS("platform:" DRIVER_NAME); | ||