summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/uio
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/uio
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page. During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
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>