aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/savage/savagefb-i2c.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-09-15 08:58:57 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-15 11:24:09 -0400
commit7b6a186d65589901a73d460070504a5e02703c45 (patch)
treeadc52e885b8ffbf50853b6f67eb55e6a6c2a4f2b /drivers/video/savage/savagefb-i2c.c
parentbe201f7f4cd26b1bb994062803e0d87877e749ce (diff)
[PATCH] savagefb: Fix load failure of the Twister chipset
- The Twister chipsets are actually prosavages. Reclassify them as such and remove the S3_SAVAGE_TWISTER id. - Fix i2c code if fb_firmware_edid() returns NULL Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/savage/savagefb-i2c.c')
-rw-r--r--drivers/video/savage/savagefb-i2c.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c
index 959404ad68f4..3c98457783c4 100644
--- a/drivers/video/savage/savagefb-i2c.c
+++ b/drivers/video/savage/savagefb-i2c.c
@@ -274,10 +274,13 @@ int savagefb_probe_i2c_connector(struct fb_info *info, u8 **out_edid)
274 274
275 if (!edid) { 275 if (!edid) {
276 /* try to get from firmware */ 276 /* try to get from firmware */
277 edid = kmalloc(EDID_LENGTH, GFP_KERNEL); 277 const u8 *e = fb_firmware_edid(info->device);
278 if (edid) 278
279 memcpy(edid, fb_firmware_edid(info->device), 279 if (e) {
280 EDID_LENGTH); 280 edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
281 if (edid)
282 memcpy(edid, e, EDID_LENGTH);
283 }
281 } 284 }
282 285
283 if (out_edid) 286 if (out_edid)