public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC: 2.6 patch] drivers/video/pm3fb.c: possible cleanups
@ 2007-06-04 22:12 Adrian Bunk
  2007-06-05 10:45 ` Antonino A. Daplas
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2007-06-04 22:12 UTC (permalink / raw)
  To: Krzysztof Helt, Antonino Daplas; +Cc: linux-kernel

This patch contains the following possible cleanups:
- remove the empty pm3fb_setup() and corresponding code
- pm3fb_init() can become static

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/video/pm3fb.c |   31 +------------------------------
 1 file changed, 1 insertion(+), 30 deletions(-)

--- linux-2.6.22-rc3-mm1/drivers/video/pm3fb.c.old	2007-06-04 22:49:25.000000000 +0200
+++ linux-2.6.22-rc3-mm1/drivers/video/pm3fb.c	2007-06-04 22:52:54.000000000 +0200
@@ -380,8 +380,6 @@ static void pm3fb_write_mode(struct fb_i
 /*
  * hardware independent functions
  */
-int pm3fb_init(void);
-
 static int pm3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
 {
 	u32 lpitch;
@@ -935,35 +933,8 @@ static struct pci_driver pm3fb_driver = 
 
 MODULE_DEVICE_TABLE(pci, pm3fb_id_table);
 
-#ifndef MODULE
-	/*
-	 *  Setup
-	 */
-
-/*
- * Only necessary if your driver takes special options,
- * otherwise we fall back on the generic fb_setup().
- */
-static int __init pm3fb_setup(char *options)
+static int __init pm3fb_init(void)
 {
-	/* Parse user speficied options (`video=pm3fb:') */
-	return 0;
-}
-#endif /* MODULE */
-
-int __init pm3fb_init(void)
-{
-	/*
-	 *  For kernel boot options (in 'video=pm3fb:<options>' format)
-	 */
-#ifndef MODULE
-	char *option = NULL;
-
-	if (fb_get_options("pm3fb", &option))
-		return -ENODEV;
-	pm3fb_setup(option);
-#endif
-
 	return pci_register_driver(&pm3fb_driver);
 }
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC: 2.6 patch] drivers/video/pm3fb.c: possible cleanups
  2007-06-04 22:12 [RFC: 2.6 patch] drivers/video/pm3fb.c: possible cleanups Adrian Bunk
@ 2007-06-05 10:45 ` Antonino A. Daplas
  2007-06-06 15:40   ` Krzysztof Helt
  0 siblings, 1 reply; 3+ messages in thread
From: Antonino A. Daplas @ 2007-06-05 10:45 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Krzysztof Helt, linux-kernel

On Tue, 2007-06-05 at 00:12 +0200, Adrian Bunk wrote:
> This patch contains the following possible cleanups:

> -
> -int __init pm3fb_init(void)
> -{
> -	/*
> -	 *  For kernel boot options (in 'video=pm3fb:<options>' format)
> -	 */
> -#ifndef MODULE
> -	char *option = NULL;
> -
> -	if (fb_get_options("pm3fb", &option))
> -		return -ENODEV;

The cleanup is good, but we should still leave the above with
the second parameter as NULL so the driver can also listen to
global options, such as video=pm3fb:off.

I'll fix this up. Thanks.

Krzysztof,

I think this patch is okay.  If you need to add an option parser
for your driver, you can always add this in the future.

Tony



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC: 2.6 patch] drivers/video/pm3fb.c: possible cleanups
  2007-06-05 10:45 ` Antonino A. Daplas
@ 2007-06-06 15:40   ` Krzysztof Helt
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Helt @ 2007-06-06 15:40 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Adrian Bunk, linux-kernel



Antonino A. Daplas wrote:
> 
> Krzysztof,
> 
> I think this patch is okay.  If you need to add an option parser
> for your driver, you can always add this in the future.
> 

I haven't been doing cleanup of this driver as I am still working on it (as time allows). The copyarea acceleration is done and working (it is faster than unaccelerated redraw even without the smart blitter patch).

I'll add the removed functions if they will be required. I have to check how many original (2.4) options overlap with generic options of the 2.6 kernel (like off or mode setting). Anyway, I am focused on acceleration at the moment.

Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-05 15:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 22:12 [RFC: 2.6 patch] drivers/video/pm3fb.c: possible cleanups Adrian Bunk
2007-06-05 10:45 ` Antonino A. Daplas
2007-06-06 15:40   ` Krzysztof Helt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox