diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-11-22 13:06:44 -0500 |
commit | 0bd2af46839ad6262d25714a6ec0365db9d6b98f (patch) | |
tree | dcced72d230d69fd0c5816ac6dd03ab84799a93e /drivers/video/fb_ddc.c | |
parent | e138a5d2356729b8752e88520cc1525fae9794ac (diff) | |
parent | f26b90440cd74c78fe10c9bd5160809704a9627c (diff) |
Merge ../scsi-rc-fixes-2.6
Diffstat (limited to 'drivers/video/fb_ddc.c')
-rw-r--r-- | drivers/video/fb_ddc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/fb_ddc.c b/drivers/video/fb_ddc.c index 3aa6ebf68f17..f836137a0eda 100644 --- a/drivers/video/fb_ddc.c +++ b/drivers/video/fb_ddc.c | |||
@@ -20,26 +20,26 @@ | |||
20 | static unsigned char *fb_do_probe_ddc_edid(struct i2c_adapter *adapter) | 20 | static unsigned char *fb_do_probe_ddc_edid(struct i2c_adapter *adapter) |
21 | { | 21 | { |
22 | unsigned char start = 0x0; | 22 | unsigned char start = 0x0; |
23 | unsigned char *buf = kmalloc(EDID_LENGTH, GFP_KERNEL); | ||
23 | struct i2c_msg msgs[] = { | 24 | struct i2c_msg msgs[] = { |
24 | { | 25 | { |
25 | .addr = DDC_ADDR, | 26 | .addr = DDC_ADDR, |
27 | .flags = 0, | ||
26 | .len = 1, | 28 | .len = 1, |
27 | .buf = &start, | 29 | .buf = &start, |
28 | }, { | 30 | }, { |
29 | .addr = DDC_ADDR, | 31 | .addr = DDC_ADDR, |
30 | .flags = I2C_M_RD, | 32 | .flags = I2C_M_RD, |
31 | .len = EDID_LENGTH, | 33 | .len = EDID_LENGTH, |
34 | .buf = buf, | ||
32 | } | 35 | } |
33 | }; | 36 | }; |
34 | unsigned char *buf; | ||
35 | 37 | ||
36 | buf = kmalloc(EDID_LENGTH, GFP_KERNEL); | ||
37 | if (!buf) { | 38 | if (!buf) { |
38 | dev_warn(&adapter->dev, "unable to allocate memory for EDID " | 39 | dev_warn(&adapter->dev, "unable to allocate memory for EDID " |
39 | "block.\n"); | 40 | "block.\n"); |
40 | return NULL; | 41 | return NULL; |
41 | } | 42 | } |
42 | msgs[1].buf = buf; | ||
43 | 43 | ||
44 | if (i2c_transfer(adapter, msgs, 2) == 2) | 44 | if (i2c_transfer(adapter, msgs, 2) == 2) |
45 | return buf; | 45 | return buf; |