projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
[deliverable/linux.git]
/
drivers
/
video
/
controlfb.c
diff --git
a/drivers/video/controlfb.c
b/drivers/video/controlfb.c
index 04c6d928189b82b1c761fafb5ea408267c187958..49fcbe8f18ac4dbbd958f5e1973be85dda2875ae 100644
(file)
--- a/
drivers/video/controlfb.c
+++ b/
drivers/video/controlfb.c
@@
-94,7
+94,7
@@
static inline int VAR_MATCH(struct fb_var_screeninfo *x, struct fb_var_screeninf
struct fb_info_control {
struct fb_info info;
struct fb_par_control par;
struct fb_info_control {
struct fb_info info;
struct fb_par_control par;
- u32 pseudo_palette[1
7
];
+ u32 pseudo_palette[1
6
];
struct cmap_regs __iomem *cmap_regs;
unsigned long cmap_regs_phys;
struct cmap_regs __iomem *cmap_regs;
unsigned long cmap_regs_phys;
@@
-179,12
+179,14
@@
MODULE_LICENSE("GPL");
int init_module(void)
{
struct device_node *dp;
int init_module(void)
{
struct device_node *dp;
+ int ret = -ENXIO;
- dp =
find_devices(
"control");
+ dp =
of_find_node_by_name(NULL,
"control");
if (dp != 0 && !control_of_init(dp))
if (dp != 0 && !control_of_init(dp))
- return 0;
+ ret = 0;
+ of_node_put(dp);
- return
-ENXIO
;
+ return
ret
;
}
void cleanup_module(void)
}
void cleanup_module(void)
@@
-296,10
+298,10
@@
static int controlfb_mmap(struct fb_info *info,
return -EINVAL;
start = info->fix.mmio_start;
len = PAGE_ALIGN((start & ~PAGE_MASK)+info->fix.mmio_len);
return -EINVAL;
start = info->fix.mmio_start;
len = PAGE_ALIGN((start & ~PAGE_MASK)+info->fix.mmio_len);
-
pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED
;
+
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot)
;
} else {
/* framebuffer */
} else {
/* framebuffer */
-
pgprot_val(vma->vm_page_prot) |= _PAGE_WRITETHRU
;
+
vma->vm_page_prot = pgprot_cached_wthru(vma->vm_page_prot)
;
}
start &= PAGE_MASK;
if ((vma->vm_end - vma->vm_start + off) > len)
}
start &= PAGE_MASK;
if ((vma->vm_end - vma->vm_start + off) > len)
@@
-589,16
+591,18
@@
static int __init control_init(void)
{
struct device_node *dp;
char *option = NULL;
{
struct device_node *dp;
char *option = NULL;
+ int ret = -ENXIO;
if (fb_get_options("controlfb", &option))
return -ENODEV;
control_setup(option);
if (fb_get_options("controlfb", &option))
return -ENODEV;
control_setup(option);
- dp =
find_devices(
"control");
+ dp =
of_find_node_by_name(NULL,
"control");
if (dp != 0 && !control_of_init(dp))
if (dp != 0 && !control_of_init(dp))
- return 0;
+ ret = 0;
+ of_node_put(dp);
- return
-ENXIO
;
+ return
ret
;
}
module_init(control_init);
}
module_init(control_init);
@@
-696,11
+700,10
@@
static int __init control_of_init(struct device_node *dp)
printk(KERN_ERR "can't get 2 addresses for control\n");
return -ENXIO;
}
printk(KERN_ERR "can't get 2 addresses for control\n");
return -ENXIO;
}
- p = k
m
alloc(sizeof(*p), GFP_KERNEL);
+ p = k
z
alloc(sizeof(*p), GFP_KERNEL);
if (p == 0)
return -ENXIO;
control_fb = p; /* save it for cleanups */
if (p == 0)
return -ENXIO;
control_fb = p; /* save it for cleanups */
- memset(p, 0, sizeof(*p));
/* Map in frame buffer and registers */
p->fb_orig_base = fb_res.start;
/* Map in frame buffer and registers */
p->fb_orig_base = fb_res.start;
This page took
0.02632 seconds
and
5
git commands to generate.