git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
platform driver: fix incorrect use of 'platform_bus_type' with 'struct device_driver'
[pandora-kernel.git]
/
drivers
/
video
/
au1200fb.c
diff --git
a/drivers/video/au1200fb.c
b/drivers/video/au1200fb.c
index
c6a5f0c
..
0d96f1d
100644
(file)
--- a/
drivers/video/au1200fb.c
+++ b/
drivers/video/au1200fb.c
@@
-1545,7
+1545,7
@@
static struct fb_ops au1200fb_fb_ops = {
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-static irqreturn_t au1200fb_handle_irq(int irq, void* dev_id
, struct pt_regs *regs
)
+static irqreturn_t au1200fb_handle_irq(int irq, void* dev_id)
{
/* Nothing to do for now, just clear any pending interrupt */
lcd->intstatus = lcd->intstatus;
{
/* Nothing to do for now, just clear any pending interrupt */
lcd->intstatus = lcd->intstatus;
@@
-1589,11
+1589,10
@@
static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev)
return -EFAULT;
}
return -EFAULT;
}
- fbi->pseudo_palette = k
malloc(sizeof(u32) * 16
, GFP_KERNEL);
+ fbi->pseudo_palette = k
calloc(16, sizeof(u32)
, GFP_KERNEL);
if (!fbi->pseudo_palette) {
return -ENOMEM;
}
if (!fbi->pseudo_palette) {
return -ENOMEM;
}
- memset(fbi->pseudo_palette, 0, sizeof(u32) * 16);
if (fb_alloc_cmap(&fbi->cmap, AU1200_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
print_err("Fail to allocate colormap (%d entries)",
if (fb_alloc_cmap(&fbi->cmap, AU1200_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
print_err("Fail to allocate colormap (%d entries)",
@@
-1623,7
+1622,7
@@
static int au1200fb_init_fbinfo(struct au1200fb_device *fbdev)
/* AU1200 LCD controller device driver */
/* AU1200 LCD controller device driver */
-static int au1200fb_drv_probe(struct device *dev)
+static int au1200fb_drv_probe(struct
platform_
device *dev)
{
struct au1200fb_device *fbdev;
unsigned long page;
{
struct au1200fb_device *fbdev;
unsigned long page;
@@
-1646,7
+1645,7
@@
static int au1200fb_drv_probe(struct device *dev)
/* Allocate the framebuffer to the maximum screen size */
fbdev->fb_len = (win->w[plane].xres * win->w[plane].yres * bpp) / 8;
/* Allocate the framebuffer to the maximum screen size */
fbdev->fb_len = (win->w[plane].xres * win->w[plane].yres * bpp) / 8;
- fbdev->fb_mem = dma_alloc_noncoherent(dev,
+ fbdev->fb_mem = dma_alloc_noncoherent(
&dev->
dev,
PAGE_ALIGN(fbdev->fb_len),
&fbdev->fb_phys, GFP_KERNEL);
if (!fbdev->fb_mem) {
PAGE_ALIGN(fbdev->fb_len),
&fbdev->fb_phys, GFP_KERNEL);
if (!fbdev->fb_mem) {
@@
-1716,7
+1715,7
@@
failed:
return ret;
}
return ret;
}
-static int au1200fb_drv_remove(struct device *dev)
+static int au1200fb_drv_remove(struct
platform_
device *dev)
{
struct au1200fb_device *fbdev;
int plane;
{
struct au1200fb_device *fbdev;
int plane;
@@
-1734,7
+1733,8
@@
static int au1200fb_drv_remove(struct device *dev)
/* Clean up all probe data */
unregister_framebuffer(&fbdev->fb_info);
if (fbdev->fb_mem)
/* Clean up all probe data */
unregister_framebuffer(&fbdev->fb_info);
if (fbdev->fb_mem)
- dma_free_noncoherent(dev, PAGE_ALIGN(fbdev->fb_len),
+ dma_free_noncoherent(&dev->dev,
+ PAGE_ALIGN(fbdev->fb_len),
fbdev->fb_mem, fbdev->fb_phys);
if (fbdev->fb_info.cmap.len != 0)
fb_dealloc_cmap(&fbdev->fb_info.cmap);
fbdev->fb_mem, fbdev->fb_phys);
if (fbdev->fb_info.cmap.len != 0)
fb_dealloc_cmap(&fbdev->fb_info.cmap);
@@
-1748,22
+1748,24
@@
static int au1200fb_drv_remove(struct device *dev)
}
#ifdef CONFIG_PM
}
#ifdef CONFIG_PM
-static int au1200fb_drv_suspend(struct
device *dev, u32 state, u32 level
)
+static int au1200fb_drv_suspend(struct
platform_device *dev, u32 state
)
{
/* TODO */
return 0;
}
{
/* TODO */
return 0;
}
-static int au1200fb_drv_resume(struct
device *dev, u32 level
)
+static int au1200fb_drv_resume(struct
platform_device *dev
)
{
/* TODO */
return 0;
}
#endif /* CONFIG_PM */
{
/* TODO */
return 0;
}
#endif /* CONFIG_PM */
-static struct device_driver au1200fb_driver = {
- .name = "au1200-lcd",
- .bus = &platform_bus_type,
+static struct platform_driver au1200fb_driver = {
+ .driver = {
+ .name = "au1200-lcd",
+ .owner = THIS_MODULE,
+ },
.probe = au1200fb_drv_probe,
.remove = au1200fb_drv_remove,
#ifdef CONFIG_PM
.probe = au1200fb_drv_probe,
.remove = au1200fb_drv_remove,
#ifdef CONFIG_PM
@@
-1907,12
+1909,12
@@
static int __init au1200fb_init(void)
printk(KERN_INFO "Power management device entry for the au1200fb loaded.\n");
#endif
printk(KERN_INFO "Power management device entry for the au1200fb loaded.\n");
#endif
- return driver_register(&au1200fb_driver);
+ return
platform_
driver_register(&au1200fb_driver);
}
static void __exit au1200fb_cleanup(void)
{
}
static void __exit au1200fb_cleanup(void)
{
- driver_unregister(&au1200fb_driver);
+
platform_
driver_unregister(&au1200fb_driver);
}
module_init(au1200fb_init);
}
module_init(au1200fb_init);