[PATCH] PS3 ps3av_set_video_mode() make id signed
Roel Kluin
roel.kluin at gmail.com
Sun Jan 18 07:54:04 EST 2009
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 at 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;
More information about the Linuxppc-dev
mailing list