Blackfin fbdev fixes for 2.6.31
cover Blackfin fbdev fixes for 2.6.31
Andrew: could you pick these up ? unless i missed something, there isnt a tree for fbdev drivers, just the fb layer. these were posted to the fbdev mailing list already.
Mike Frysinger (4):
fbdev: Blackfin has __raw I/O accessors, so use them in fb.h
fbdev: bfin-t350mcqb-fb: drop unused local variables
fbdev: *bfin*: fix __dev{init,exit} markings
fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset
Vivek Kutal (1):
fbdev: *bfin*: drop unnecessary calls to memset
drivers/video/bf54x-lq043fb.c | 15 +++++---------- drivers/video/bfin-t350mcqb-fb.c | 15 +++------------ include/linux/fb.h | 2 +- 3 files changed, 9 insertions(+), 23 deletions(-)
PATCH 1/5 fbdev: Blackfin has __raw I/O accessors, so use them in fb.h
--- include/linux/fb.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/fb.h +1 -1
@@ -893,7 +893,7 @@ struct fb_info {#define fb_writeq sbus_writeq#define fb_memset sbus_memset_io -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) +#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) || defined(__bfin__)#define fb_readb __raw_readb#define fb_readw __raw_readw
Signature · 1 line
1.6.3.1
PATCH 2/5 fbdev: bfin-t350mcqb-fb: drop unused local variables
In reply to Mike FrysingerThe local fbinfo/info vars in the suspend functions don't actually get used which cause ugly gcc warnings, so drop them.
--- drivers/video/bfin-t350mcqb-fb.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
drivers/video/bfin-t350mcqb-fb.c +0 -6
@@ -637,9 +637,6 @@ static int bfin_t350mcqb_remove(struct platform_device *pdev)#ifdef CONFIG_PM static int bfin_t350mcqb_suspend (struct platform_device *pdev,pm_message_t state) { -struct fb_info *fbinfo =platform_get_drvdata (pdev); -struct bfin_t350mcqbfb_info *info = fbinfo->par; -bfin_t350mcqb_disable_ppi ();disable_dma (CH_PPI );bfin_write_PPI_STATUS (0xFFFF );
@@ -649,9 +646,6 @@ static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t statstatic int bfin_t350mcqb_resume (struct platform_device *pdev) { -struct fb_info *fbinfo =platform_get_drvdata (pdev); -struct bfin_t350mcqbfb_info *info = fbinfo->par; -enable_dma (CH_PPI );bfin_t350mcqb_enable_ppi ();
Signature · 1 line
1.6.3.1
PATCH 3/5 fbdev: *bfin*: drop unnecessary calls to memset
In reply to Mike FrysingerFrom: Vivek Kutal <[email protected]>
The dma_alloc_* functions sets the memory to 0 before returning so there is no need to call memset after the allocation. Also no point in clearing the memory when disabling the buffer.
--- drivers/video/bf54x-lq043fb.c | 3 --- drivers/video/bfin-t350mcqb-fb.c | 3 --- 2 files changed, 0 insertions(+), 6 deletions(-)
drivers/video/bf54x-lq043fb.c +0 -3
@@ -323,7 +323,6 @@ static int bfin_bf54x_fb_release(struct fb_info *info, int user)bfin_write_EPPI0_CONTROL (0 );SSYNC ();disable_dma (CH_EPPI0 ); -memset (fbi->fb_buffer,0 , info->fix.smem_len); }spin_unlock (&fbi->lock);
@@ -626,8 +625,6 @@ static int __init bfin_bf54x_probe(struct platform_device *pdev) goto out3; } -memset (info->fb_buffer,0 , fbinfo->fix.smem_len); - fbinfo->screen_base = (void *)info->fb_buffer; fbinfo->fix.smem_start = (int )info->fb_buffer;
drivers/video/bfin-t350mcqb-fb.c +0 -3
@@ -242,7 +242,6 @@ static int bfin_t350mcqb_fb_release(struct fb_info *info, int user)SSYNC ();disable_dma (CH_PPI );bfin_t350mcqb_stop_timers (); -memset (fbi->fb_buffer,0 , info->fix.smem_len); }spin_unlock (&fbi->lock);
@@ -527,8 +526,6 @@ static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) goto out3; } -memset (info->fb_buffer,0 , fbinfo->fix.smem_len); - fbinfo->screen_base = (void *)info->fb_buffer +ACTIVE_VIDEO_MEM_OFFSET ; fbinfo->fix.smem_start = (int )info->fb_buffer +ACTIVE_VIDEO_MEM_OFFSET ;
Signature · 1 line
1.6.3.1
PATCH 4/5 fbdev: *bfin*: fix __dev{init,exit} markings
In reply to Mike FrysingerThe remove member of the platform_driver bfin_t350mcqb_driver should use __devexit_p() to refer to the remove function, and that function should get __devexit markings. Likewise, the probe function should be marked with __devinit and not __init.
Also, module_init() functions should be marked with __init rather than __devinit.
--- drivers/video/bf54x-lq043fb.c | 8 ++++---- drivers/video/bfin-t350mcqb-fb.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/video/bf54x-lq043fb.c +4 -4
@@ -529,7 +529,7 @@ static irqreturn_t bfin_bf54x_irq_error(int irq, void *dev_id)return IRQ_HANDLED ; } -static int __init bfin_bf54x_probe (struct platform_device *pdev) +static int __devinit bfin_bf54x_probe (struct platform_device *pdev) {struct bfin_bf54xfb_info *info;struct fb_info *fbinfo;
@@ -709,7 +709,7 @@ out1:return ret; } -static int bfin_bf54x_remove (struct platform_device *pdev) +static int __devexit bfin_bf54x_remove(struct platform_device *pdev) {struct fb_info *fbinfo =platform_get_drvdata (pdev);
@@ -778,7 +778,7 @@ static int bfin_bf54x_resume(struct platform_device *pdev)static struct platform_driver bfin_bf54x_driver = { .probe = bfin_bf54x_probe, - .remove = bfin_bf54x_remove, + .remove =__devexit_p (bfin_bf54x_remove), .suspend = bfin_bf54x_suspend, .resume = bfin_bf54x_resume, .driver = {
@@ -787,7 +787,7 @@ static struct platform_driver bfin_bf54x_driver = { }, }; -static int __devinit bfin_bf54x_driver_init (void ) +static int __init bfin_bf54x_driver_init (void ) {return platform_driver_register (&bfin_bf54x_driver); }
drivers/video/bfin-t350mcqb-fb.c +3 -3
@@ -599,7 +599,7 @@ out1:return ret; } -static int bfin_t350mcqb_remove (struct platform_device *pdev) +static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev) {struct fb_info *fbinfo =platform_get_drvdata (pdev);
@@ -655,7 +655,7 @@ static int bfin_t350mcqb_resume(struct platform_device *pdev)static struct platform_driver bfin_t350mcqb_driver = { .probe = bfin_t350mcqb_probe, - .remove = bfin_t350mcqb_remove, + .remove =__devexit_p (bfin_t350mcqb_remove), .suspend = bfin_t350mcqb_suspend, .resume = bfin_t350mcqb_resume, .driver = {
@@ -664,7 +664,7 @@ static struct platform_driver bfin_t350mcqb_driver = { }, }; -static int __devinit bfin_t350mcqb_driver_init (void ) +static int __init bfin_t350mcqb_driver_init (void ) {return platform_driver_register (&bfin_t350mcqb_driver); }
Signature · 1 line
1.6.3.1
PATCH 5/5 fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset
In reply to Mike Frysinger--- drivers/video/bf54x-lq043fb.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/video/bf54x-lq043fb.c +1 -3
@@ -630,7 +630,7 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev) fbinfo->fbops = &bfin_bf54x_fb_ops; - fbinfo->pseudo_palette =kmalloc (sizeof (u32) *16 ,GFP_KERNEL ); + fbinfo->pseudo_palette =kzalloc (sizeof (u32) *16 ,GFP_KERNEL );if (!fbinfo->pseudo_palette) { printk(KERN_ERR DRIVER_NAME "Fail to allocate pseudo_palette\n");
@@ -639,8 +639,6 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev) goto out4; } -memset (fbinfo->pseudo_palette,0 ,sizeof (u32) *16 ); -if (fb_alloc_cmap (&fbinfo->cmap,BFIN_LCD_NBR_PALETTE_ENTRIES ,0 ) <0 ) { printk(KERN_ERR DRIVER_NAME
Signature · 1 line
1.6.3.1