summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/uio
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/uio')
-rw-r--r--kernel/drivers/uio/Kconfig2
-rw-r--r--kernel/drivers/uio/uio.c5
-rw-r--r--kernel/drivers/uio/uio_fsl_elbc_gpcm.c15
-rw-r--r--kernel/drivers/uio/uio_pruss.c1
4 files changed, 8 insertions, 15 deletions
diff --git a/kernel/drivers/uio/Kconfig b/kernel/drivers/uio/Kconfig
index 8a15c323c..52c98ce1b 100644
--- a/kernel/drivers/uio/Kconfig
+++ b/kernel/drivers/uio/Kconfig
@@ -126,8 +126,8 @@ config UIO_FSL_ELBC_GPCM_NETX5152
config UIO_PRUSS
tristate "Texas Instruments PRUSS driver"
- depends on ARCH_DAVINCI_DA850
select GENERIC_ALLOCATOR
+ depends on HAS_IOMEM && HAS_DMA
help
PRUSS driver for OMAPL138/DA850/AM18XX devices
PRUSS driver requires user space components, examples and user space
diff --git a/kernel/drivers/uio/uio.c b/kernel/drivers/uio/uio.c
index 65bf0676d..bcc1fc027 100644
--- a/kernel/drivers/uio/uio.c
+++ b/kernel/drivers/uio/uio.c
@@ -524,6 +524,7 @@ static ssize_t uio_read(struct file *filep, char __user *buf,
event_count = atomic_read(&idev->event);
if (event_count != listener->event_count) {
+ __set_current_state(TASK_RUNNING);
if (copy_to_user(buf, &event_count, count))
retval = -EFAULT;
else {
@@ -879,7 +880,8 @@ void uio_unregister_device(struct uio_info *info)
uio_dev_del_attributes(idev);
- free_irq(idev->info->irq, idev);
+ if (info->irq && info->irq != UIO_IRQ_CUSTOM)
+ free_irq(info->irq, idev);
device_destroy(&uio_class, MKDEV(uio_major, idev->minor));
@@ -895,6 +897,7 @@ static int __init uio_init(void)
static void __exit uio_exit(void)
{
release_uio_class();
+ idr_destroy(&uio_idr);
}
module_init(uio_init)
diff --git a/kernel/drivers/uio/uio_fsl_elbc_gpcm.c b/kernel/drivers/uio/uio_fsl_elbc_gpcm.c
index b6cac91c2..b46323d9d 100644
--- a/kernel/drivers/uio/uio_fsl_elbc_gpcm.c
+++ b/kernel/drivers/uio/uio_fsl_elbc_gpcm.c
@@ -470,6 +470,7 @@ static const struct of_device_id uio_fsl_elbc_gpcm_match[] = {
{ .compatible = "fsl,elbc-gpcm-uio", },
{}
};
+MODULE_DEVICE_TABLE(of, uio_fsl_elbc_gpcm_match);
static struct platform_driver uio_fsl_elbc_gpcm_driver = {
.driver = {
@@ -480,19 +481,7 @@ static struct platform_driver uio_fsl_elbc_gpcm_driver = {
.probe = uio_fsl_elbc_gpcm_probe,
.remove = uio_fsl_elbc_gpcm_remove,
};
-
-static int __init uio_fsl_elbc_gpcm_init(void)
-{
- return platform_driver_register(&uio_fsl_elbc_gpcm_driver);
-}
-
-static void __exit uio_fsl_elbc_gpcm_exit(void)
-{
- platform_driver_unregister(&uio_fsl_elbc_gpcm_driver);
-}
-
-module_init(uio_fsl_elbc_gpcm_init);
-module_exit(uio_fsl_elbc_gpcm_exit);
+module_platform_driver(uio_fsl_elbc_gpcm_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("John Ogness <john.ogness@linutronix.de>");
diff --git a/kernel/drivers/uio/uio_pruss.c b/kernel/drivers/uio/uio_pruss.c
index 818735bb8..ca9e2fafb 100644
--- a/kernel/drivers/uio/uio_pruss.c
+++ b/kernel/drivers/uio/uio_pruss.c
@@ -24,6 +24,7 @@
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
+#include <linux/sizes.h>
#include <linux/slab.h>
#include <linux/genalloc.h>