* [PATCH 0/5] Blackfin fbdev fixes for 2.6.31
@ 2009-06-13 0:55 Mike Frysinger
2009-06-13 0:55 ` [PATCH 1/5] fbdev: Blackfin has __raw I/O accessors, so use them in fb.h Mike Frysinger
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-06-13 0:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
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(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/5] fbdev: Blackfin has __raw I/O accessors, so use them in fb.h
2009-06-13 0:55 [PATCH 0/5] Blackfin fbdev fixes for 2.6.31 Mike Frysinger
@ 2009-06-13 0:55 ` Mike Frysinger
2009-06-13 0:55 ` [PATCH 2/5] fbdev: bfin-t350mcqb-fb: drop unused local variables Mike Frysinger
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-06-13 0:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
include/linux/fb.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 330c4b1..3292a11 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -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
--
1.6.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/5] fbdev: bfin-t350mcqb-fb: drop unused local variables
2009-06-13 0:55 [PATCH 0/5] Blackfin fbdev fixes for 2.6.31 Mike Frysinger
2009-06-13 0:55 ` [PATCH 1/5] fbdev: Blackfin has __raw I/O accessors, so use them in fb.h Mike Frysinger
@ 2009-06-13 0:55 ` Mike Frysinger
2009-06-13 0:55 ` [PATCH 3/5] fbdev: *bfin*: drop unnecessary calls to memset Mike Frysinger
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-06-13 0:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
The local fbinfo/info vars in the suspend functions don't actually get
used which cause ugly gcc warnings, so drop them.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/video/bfin-t350mcqb-fb.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index 90cfdda..2a2e116 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -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 stat
static 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();
--
1.6.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/5] fbdev: *bfin*: drop unnecessary calls to memset
2009-06-13 0:55 [PATCH 0/5] Blackfin fbdev fixes for 2.6.31 Mike Frysinger
2009-06-13 0:55 ` [PATCH 1/5] fbdev: Blackfin has __raw I/O accessors, so use them in fb.h Mike Frysinger
2009-06-13 0:55 ` [PATCH 2/5] fbdev: bfin-t350mcqb-fb: drop unused local variables Mike Frysinger
@ 2009-06-13 0:55 ` Mike Frysinger
2009-06-13 0:55 ` [PATCH 4/5] fbdev: *bfin*: fix __dev{init,exit} markings Mike Frysinger
2009-06-13 0:55 ` [PATCH 5/5] fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset Mike Frysinger
4 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-06-13 0:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Vivek Kutal
From: Vivek Kutal <vivek.kutal@azingo.com>
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.
Signed-off-by: Vivek Kutal <vivek.kutal@azingo.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/video/bf54x-lq043fb.c | 3 ---
drivers/video/bfin-t350mcqb-fb.c | 3 ---
2 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 37e60b1..6439a43 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -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;
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index 2a2e116..f40eef8 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -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;
--
1.6.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5] fbdev: *bfin*: fix __dev{init,exit} markings
2009-06-13 0:55 [PATCH 0/5] Blackfin fbdev fixes for 2.6.31 Mike Frysinger
` (2 preceding siblings ...)
2009-06-13 0:55 ` [PATCH 3/5] fbdev: *bfin*: drop unnecessary calls to memset Mike Frysinger
@ 2009-06-13 0:55 ` Mike Frysinger
2009-06-13 0:55 ` [PATCH 5/5] fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset Mike Frysinger
4 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-06-13 0:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
The 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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/video/bf54x-lq043fb.c | 8 ++++----
drivers/video/bfin-t350mcqb-fb.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 6439a43..8aa67de 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -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);
}
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index f40eef8..5cc36cf 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -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);
}
--
1.6.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/5] fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset
2009-06-13 0:55 [PATCH 0/5] Blackfin fbdev fixes for 2.6.31 Mike Frysinger
` (3 preceding siblings ...)
2009-06-13 0:55 ` [PATCH 4/5] fbdev: *bfin*: fix __dev{init,exit} markings Mike Frysinger
@ 2009-06-13 0:55 ` Mike Frysinger
4 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-06-13 0:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/video/bf54x-lq043fb.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 8aa67de..e49ae5e 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -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
--
1.6.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-13 0:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-13 0:55 [PATCH 0/5] Blackfin fbdev fixes for 2.6.31 Mike Frysinger
2009-06-13 0:55 ` [PATCH 1/5] fbdev: Blackfin has __raw I/O accessors, so use them in fb.h Mike Frysinger
2009-06-13 0:55 ` [PATCH 2/5] fbdev: bfin-t350mcqb-fb: drop unused local variables Mike Frysinger
2009-06-13 0:55 ` [PATCH 3/5] fbdev: *bfin*: drop unnecessary calls to memset Mike Frysinger
2009-06-13 0:55 ` [PATCH 4/5] fbdev: *bfin*: fix __dev{init,exit} markings Mike Frysinger
2009-06-13 0:55 ` [PATCH 5/5] fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).