projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull ia64-mutex-primitives into release branch
[powerpc.git]
/
drivers
/
video
/
gbefb.c
diff --git
a/drivers/video/gbefb.c
b/drivers/video/gbefb.c
index
316bfe9
..
5e25b98
100644
(file)
--- a/
drivers/video/gbefb.c
+++ b/
drivers/video/gbefb.c
@@
-656,12
+656,15
@@
static int gbefb_set_par(struct fb_info *info)
switch (bytesPerPixel) {
case 1:
SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_I8);
switch (bytesPerPixel) {
case 1:
SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_I8);
+ info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
break;
case 2:
SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_ARGB5);
break;
case 2:
SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_ARGB5);
+ info->fix.visual = FB_VISUAL_TRUECOLOR;
break;
case 4:
SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_RGB8);
break;
case 4:
SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_RGB8);
+ info->fix.visual = FB_VISUAL_TRUECOLOR;
break;
}
SET_GBE_FIELD(WID, BUF, val, GBE_BMODE_BOTH);
break;
}
SET_GBE_FIELD(WID, BUF, val, GBE_BMODE_BOTH);
@@
-979,7
+982,7
@@
static int gbefb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
return 0;
}
return 0;
}
-static int gbefb_mmap(struct fb_info *info,
struct file *file,
+static int gbefb_mmap(struct fb_info *info,
struct vm_area_struct *vma)
{
unsigned long size = vma->vm_end - vma->vm_start;
struct vm_area_struct *vma)
{
unsigned long size = vma->vm_end - vma->vm_start;
@@
-1000,7
+1003,6
@@
static int gbefb_mmap(struct fb_info *info, struct file *file,
pgprot_fb(pgprot_val(vma->vm_page_prot));
vma->vm_flags |= VM_IO | VM_RESERVED;
pgprot_fb(pgprot_val(vma->vm_page_prot));
vma->vm_flags |= VM_IO | VM_RESERVED;
- vma->vm_file = file;
/* look for the starting tile */
tile = &gbe_tiles.cpu[offset >> TILE_SHIFT];
/* look for the starting tile */
tile = &gbe_tiles.cpu[offset >> TILE_SHIFT];
@@
-1038,7
+1040,6
@@
static struct fb_ops gbefb_ops = {
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
- .fb_cursor = soft_cursor,
};
/*
};
/*
@@
-1106,12
+1107,11
@@
int __init gbefb_setup(char *options)
return 0;
}
return 0;
}
-static int __init gbefb_probe(struct
device *
dev)
+static int __init gbefb_probe(struct
platform_device *p_
dev)
{
int i, ret = 0;
struct fb_info *info;
struct gbefb_par *par;
{
int i, ret = 0;
struct fb_info *info;
struct gbefb_par *par;
- struct platform_device *p_dev = to_platform_device(dev);
#ifndef MODULE
char *options = NULL;
#endif
#ifndef MODULE
char *options = NULL;
#endif
@@
-1205,8
+1205,8
@@
static int __init gbefb_probe(struct device *dev)
goto out_gbe_unmap;
}
goto out_gbe_unmap;
}
-
dev_set_drvdata(&p_dev->
dev, info);
- gbefb_create_sysfs(dev);
+
platform_set_drvdata(p_
dev, info);
+ gbefb_create_sysfs(
&p_dev->
dev);
printk(KERN_INFO "fb%d: %s rev %d @ 0x%08x using %dkB memory\n",
info->node, info->fix.id, gbe_revision, (unsigned) GBE_BASE,
printk(KERN_INFO "fb%d: %s rev %d @ 0x%08x using %dkB memory\n",
info->node, info->fix.id, gbe_revision, (unsigned) GBE_BASE,
@@
-1232,10
+1232,9
@@
out_release_framebuffer:
return ret;
}
return ret;
}
-static int __devexit gbefb_remove(struct
device*
dev)
+static int __devexit gbefb_remove(struct
platform_device* p_
dev)
{
{
- struct platform_device *p_dev = to_platform_device(dev);
- struct fb_info *info = dev_get_drvdata(&p_dev->dev);
+ struct fb_info *info = platform_get_drvdata(p_dev);
unregister_framebuffer(info);
gbe_turn_off();
unregister_framebuffer(info);
gbe_turn_off();
@@
-1247,37
+1246,44
@@
static int __devexit gbefb_remove(struct device* dev)
(void *)gbe_tiles.cpu, gbe_tiles.dma);
release_mem_region(GBE_BASE, sizeof(struct sgi_gbe));
iounmap(gbe);
(void *)gbe_tiles.cpu, gbe_tiles.dma);
release_mem_region(GBE_BASE, sizeof(struct sgi_gbe));
iounmap(gbe);
- gbefb_remove_sysfs(dev);
+ gbefb_remove_sysfs(
&p_dev->
dev);
framebuffer_release(info);
return 0;
}
framebuffer_release(info);
return 0;
}
-static struct device_driver gbefb_driver = {
- .name = "gbefb",
- .bus = &platform_bus_type,
+static struct platform_driver gbefb_driver = {
.probe = gbefb_probe,
.remove = __devexit_p(gbefb_remove),
.probe = gbefb_probe,
.remove = __devexit_p(gbefb_remove),
+ .driver = {
+ .name = "gbefb",
+ },
};
};
-static struct platform_device gbefb_device = {
- .name = "gbefb",
-};
+static struct platform_device *gbefb_device;
int __init gbefb_init(void)
{
int __init gbefb_init(void)
{
- int ret = driver_register(&gbefb_driver);
+ int ret =
platform_
driver_register(&gbefb_driver);
if (!ret) {
if (!ret) {
- ret = platform_device_register(&gbefb_device);
- if (ret)
- driver_unregister(&gbefb_driver);
+ gbefb_device = platform_device_alloc("gbefb", 0);
+ if (gbefb_device) {
+ ret = platform_device_add(gbefb_device);
+ } else {
+ ret = -ENOMEM;
+ }
+ if (ret) {
+ platform_device_put(gbefb_device);
+ platform_driver_unregister(&gbefb_driver);
+ }
}
return ret;
}
void __exit gbefb_exit(void)
{
}
return ret;
}
void __exit gbefb_exit(void)
{
- driver_unregister(&gbefb_driver);
+ platform_device_unregister(gbefb_device);
+ platform_driver_unregister(&gbefb_driver);
}
module_init(gbefb_init);
}
module_init(gbefb_init);