Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2011-09-27 22:25:34 +0200
committerEgbert Eich <eich@suse.de>2011-09-27 22:27:57 +0200
commit292911eff3f2c87ba25f146d1e4cf158edde207a (patch)
tree5ab4157cf953c38f4854f55b58b0d8ab0a253909
parent22dfe1ab0b16e10427f46468f4a80ee85bbe1f4f (diff)
Refresh patches.suse/SUSE-bootsplash.
Fix crash when updating boxes: Don't reallocate picture. suse-commit: ba0cfdcb4a536831694e3844d9ecdb3870506e6b
-rw-r--r--drivers/video/bootsplash/bootsplash.c17
-rw-r--r--drivers/video/bootsplash/decode-jpg.h2
2 files changed, 3 insertions, 16 deletions
diff --git a/drivers/video/bootsplash/bootsplash.c b/drivers/video/bootsplash/bootsplash.c
index 4ab2ca97ee2a..b6f8aae5d1e9 100644
--- a/drivers/video/bootsplash/bootsplash.c
+++ b/drivers/video/bootsplash/bootsplash.c
@@ -731,7 +731,7 @@ static void splash_pivot_current(struct vc_data *vc, struct splash_data *new)
}
}
-static int get_raw_v2(struct vc_data *vc,
+static int update_boxes(struct vc_data *vc,
const int *offsets,
unsigned char *ndata, int len, unsigned char * end,
int *update)
@@ -802,19 +802,6 @@ static int get_raw_v2(struct vc_data *vc,
}
if (update)
*update = up;
-
- if (sd->pic->ref_cnt > 1) {
- struct splash_pic_data *pic;
- pic = kzalloc(sizeof
- (struct splash_pic_data),
- GFP_KERNEL);
- if (!pic)
- return -1;
- sd->pic = pic;
- }
- sd->pic->ref_cnt = 1;
- sd->pic->splash_pic = NULL;
- sd->pic->splash_pic_size = 0;
}
return 0;
}
@@ -890,7 +877,7 @@ static int splash_getraw(unsigned char *start, unsigned char *end, int *update)
* since we can have multiple splash_data records
*/
if (splash_size == (int)0xffffffff && version > 1) {
- if (get_raw_v2(vc, offsets, ndata, len, end, update) < 0)
+ if (update_boxes(vc, offsets, ndata, len, end, update) < 0)
return -1;
return unit;
diff --git a/drivers/video/bootsplash/decode-jpg.h b/drivers/video/bootsplash/decode-jpg.h
index 241fab87a91c..df324ec759a7 100644
--- a/drivers/video/bootsplash/decode-jpg.h
+++ b/drivers/video/bootsplash/decode-jpg.h
@@ -29,7 +29,7 @@ struct jpeg_decdata {
int dquant[3][64];
};
-extern int jpeg_decode(unsigned char *buf, unsigned char *pic,
+extern int jpeg_decode(unsigned char *buf, unsigned char *pic,
int width, int height, enum splash_color_format cf,
struct jpeg_decdata *);
extern void jpeg_get_size(unsigned char *, int *, int *);