projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
[cascardo/linux.git]
/
drivers
/
char
/
mem.c
diff --git
a/drivers/char/mem.c
b/drivers/char/mem.c
index
524b707
..
4c58333
100644
(file)
--- a/
drivers/char/mem.c
+++ b/
drivers/char/mem.c
@@
-84,9
+84,12
@@
static inline int range_is_allowed(unsigned long pfn, unsigned long size)
}
#endif
}
#endif
-void __weak unxlate_dev_mem_ptr(unsigned long phys, void *addr)
+#ifndef unxlate_dev_mem_ptr
+#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
+void __weak unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
{
}
{
}
+#endif
/*
* This funcion reads the *physical* memory. The f_pos points directly to the
/*
* This funcion reads the *physical* memory. The f_pos points directly to the
@@
-97,7
+100,7
@@
static ssize_t read_mem(struct file *file, char __user *buf,
{
phys_addr_t p = *ppos;
ssize_t read, sz;
{
phys_addr_t p = *ppos;
ssize_t read, sz;
-
char
*ptr;
+
void
*ptr;
if (p != *ppos)
return 0;
if (p != *ppos)
return 0;
@@
-400,7
+403,7
@@
static ssize_t read_kmem(struct file *file, char __user *buf,
* uncached, then it must also be accessed uncached
* by the kernel or data corruption may occur
*/
* uncached, then it must also be accessed uncached
* by the kernel or data corruption may occur
*/
- kbuf = xlate_dev_kmem_ptr((
char
*)p);
+ kbuf = xlate_dev_kmem_ptr((
void
*)p);
if (copy_to_user(buf, kbuf, sz))
return -EFAULT;
if (copy_to_user(buf, kbuf, sz))
return -EFAULT;
@@
-461,7
+464,7
@@
static ssize_t do_write_kmem(unsigned long p, const char __user *buf,
#endif
while (count > 0) {
#endif
while (count > 0) {
-
char
*ptr;
+
void
*ptr;
sz = size_inside_page(p, count);
sz = size_inside_page(p, count);
@@
-470,7
+473,7
@@
static ssize_t do_write_kmem(unsigned long p, const char __user *buf,
* it must also be accessed uncached by the kernel or data
* corruption may occur.
*/
* it must also be accessed uncached by the kernel or data
* corruption may occur.
*/
- ptr = xlate_dev_kmem_ptr((
char
*)p);
+ ptr = xlate_dev_kmem_ptr((
void
*)p);
copied = copy_from_user(ptr, buf, sz);
if (copied) {
copied = copy_from_user(ptr, buf, sz);
if (copied) {