diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-04-08 09:06:12 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-08 10:18:47 +0200 |
commit | c1ab9cab75098924fa8226a8a371de66977439df (patch) | |
tree | 767e77302ca8f2eb781c60624bc8518cd50ba6eb /drivers/char/mem.c | |
parent | ff0ff84a0767df48d728c36510365344a7e7d582 (diff) | |
parent | f5284e7635787224dda1a2bf82a4c56b1c75671f (diff) |
Merge branch 'linus' into tracing/core
Conflicts:
include/linux/module.h
kernel/module.c
Semantic conflict:
include/trace/events/module.h
Merge reason: Resolve the conflict with upstream commit 5fbfb18 ("Fix up
possibly racy module refcounting")
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/char/mem.c')
-rw-r--r-- | drivers/char/mem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 1f3215ac085..f54dab8acdc 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -225,6 +225,7 @@ int __weak phys_mem_access_prot_allowed(struct file *file, * outside of main memory. * */ +#ifdef pgprot_noncached static int uncached_access(struct file *file, unsigned long addr) { #if defined(CONFIG_IA64) @@ -251,6 +252,7 @@ static int uncached_access(struct file *file, unsigned long addr) return addr >= __pa(high_memory); #endif } +#endif static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, unsigned long size, pgprot_t vma_prot) @@ -710,11 +712,6 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig) switch (orig) { case SEEK_CUR: offset += file->f_pos; - if ((unsigned long long)offset < - (unsigned long long)file->f_pos) { - ret = -EOVERFLOW; - break; - } case SEEK_SET: /* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */ if ((unsigned long long)offset >= ~0xFFFULL) { @@ -908,6 +905,9 @@ static int __init chr_dev_init(void) printk("unable to get major %d for memory devs\n", MEM_MAJOR); mem_class = class_create(THIS_MODULE, "mem"); + if (IS_ERR(mem_class)) + return PTR_ERR(mem_class); + mem_class->devnode = mem_devnode; for (minor = 1; minor < ARRAY_SIZE(devlist); minor++) { if (!devlist[minor].name) |