diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-25 02:23:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-25 02:23:39 -0400 |
commit | 4742dc1d7670bd00253d2dfb637d55446dc6ef81 (patch) | |
tree | d22a9b7002413e692b8eda18f20b555c06263921 /drivers | |
parent | 49741c4d01554c2630cea02cfdf236b17062a912 (diff) | |
parent | 815d2d50da41f28aae58f5e9b3c61c3094422749 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
driver core: debug for bad dev_attr_show() return value.
UIO: add pgprot_noncached() to UIO mmap code
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/core.c | 5 | ||||
-rw-r--r-- | drivers/uio/uio.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 7de543d1d0b4..24198ad01976 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kdev_t.h> | 19 | #include <linux/kdev_t.h> |
20 | #include <linux/notifier.h> | 20 | #include <linux/notifier.h> |
21 | #include <linux/genhd.h> | 21 | #include <linux/genhd.h> |
22 | #include <linux/kallsyms.h> | ||
22 | #include <asm/semaphore.h> | 23 | #include <asm/semaphore.h> |
23 | 24 | ||
24 | #include "base.h" | 25 | #include "base.h" |
@@ -68,6 +69,10 @@ static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, | |||
68 | 69 | ||
69 | if (dev_attr->show) | 70 | if (dev_attr->show) |
70 | ret = dev_attr->show(dev, dev_attr, buf); | 71 | ret = dev_attr->show(dev, dev_attr, buf); |
72 | if (ret >= (ssize_t)PAGE_SIZE) { | ||
73 | print_symbol("dev_attr_show: %s returned bad count\n", | ||
74 | (unsigned long)dev_attr->show); | ||
75 | } | ||
71 | return ret; | 76 | return ret; |
72 | } | 77 | } |
73 | 78 | ||
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index e8a01f264540..11759080ca54 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -470,6 +470,8 @@ static int uio_mmap_physical(struct vm_area_struct *vma) | |||
470 | 470 | ||
471 | vma->vm_flags |= VM_IO | VM_RESERVED; | 471 | vma->vm_flags |= VM_IO | VM_RESERVED; |
472 | 472 | ||
473 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
474 | |||
473 | return remap_pfn_range(vma, | 475 | return remap_pfn_range(vma, |
474 | vma->vm_start, | 476 | vma->vm_start, |
475 | idev->info->mem[mi].addr >> PAGE_SHIFT, | 477 | idev->info->mem[mi].addr >> PAGE_SHIFT, |