linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PS3 ps3av_set_video_mode() make id signed
@ 2009-01-17 20:54 Roel Kluin
  2009-01-20  9:21 ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Roel Kluin @ 2009-01-17 20:54 UTC (permalink / raw)
  To: geoffrey.levand; +Cc: linuxppc-dev, cbe-oss-dev

vi drivers/video/ps3fb.c +618
static int ps3fb_set_par(struct fb_info *info)
{
        struct ps3fb_par *par = info->par;
... [ and at line 660 ] ...
	if (ps3av_set_video_mode(par->new_mode_id))

now new_mode_id is an int

vi drivers/video/ps3fb.c +132
struct ps3fb_par {
...
        int new_mode_id;
...
};

vi drivers/ps3/ps3av.c +844
int ps3av_set_video_mode(u32 id)

-------------------------^^^

{
...
	if (... || id < 0) {

--------------------^^^

		dev_dbg(&ps3av->dev->core, "%s: error id :%d\n", __func__, id);
                return -EINVAL;
        }
...
		id = ps3av_auto_videomode(&ps3av->av_hw_conf);
                if (id < 1) {
---------------------^^^
                        printk(KERN_ERR "%s: invalid id :%d\n", __func__, id);
                        return -EINVAL;
                }
...
	ps3av->ps3av_mode = id;

vi drivers/ps3/ps3av.c +763
static int ps3av_auto_videomode()

-------^^^

+42
static struct ps3av {
...
        int ps3av_mode;
...
};

--------------------->8---------------8<-------------------
make id signed so a negative id will get noticed

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 5324978..7aa6d41 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -838,7 +838,7 @@ static int ps3av_get_hw_conf(struct ps3av *ps3av)
 }
 
 /* set mode using id */
-int ps3av_set_video_mode(u32 id)
+int ps3av_set_video_mode(int id)
 {
 	int size;
 	u32 option;

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

end of thread, other threads:[~2009-02-12 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-17 20:54 [PATCH] PS3 ps3av_set_video_mode() make id signed Roel Kluin
2009-01-20  9:21 ` Geert Uytterhoeven
2009-01-20 15:57   ` Roel Kluin
2009-01-22  2:32     ` Geert Uytterhoeven
2009-02-12 17:24     ` Geoff Levand

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).