Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189674
b: refs/heads/master
c: 95beb69
h: refs/heads/master
v: v3
  • Loading branch information
Alex Deucher authored and Dave Airlie committed Apr 5, 2010
1 parent 27908c5 commit 1668f6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57b54ea6b7863ccfeb41851b5f58f9fd1b83c79e
refs/heads/master: 95beb690170e6ce918fe53c73a0fcc7cf64d704a
11 changes: 7 additions & 4 deletions trunk/drivers/gpu/drm/radeon/radeon_atombios.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,19 @@ static inline struct radeon_i2c_bus_rec radeon_lookup_i2c_gpio(struct radeon_dev
struct radeon_i2c_bus_rec i2c;
int index = GetIndexIntoMasterTable(DATA, GPIO_I2C_Info);
struct _ATOM_GPIO_I2C_INFO *i2c_info;
uint16_t data_offset;
int i;
uint16_t data_offset, size;
int i, num_indices;

memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec));
i2c.valid = false;

if (atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset)) {
if (atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) {
i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset);

for (i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) {
num_indices = (size - sizeof(ATOM_COMMON_TABLE_HEADER)) /
sizeof(ATOM_GPIO_I2C_ASSIGMENT);

for (i = 0; i < num_indices; i++) {
gpio = &i2c_info->asGPIO_Info[i];

if (gpio->sucI2cId.ucAccess == id) {
Expand Down

0 comments on commit 1668f6f

Please sign in to comment.