diff options
Diffstat (limited to 'drivers/video/matrox/i2c-matroxfb.c')
-rw-r--r-- | drivers/video/matrox/i2c-matroxfb.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/video/matrox/i2c-matroxfb.c b/drivers/video/matrox/i2c-matroxfb.c index 75ee5a12e549..c14e3e2212b3 100644 --- a/drivers/video/matrox/i2c-matroxfb.c +++ b/drivers/video/matrox/i2c-matroxfb.c | |||
@@ -87,13 +87,7 @@ static int matroxfb_gpio_getscl(void* data) { | |||
87 | return (matroxfb_read_gpio(b->minfo) & b->mask.clock) ? 1 : 0; | 87 | return (matroxfb_read_gpio(b->minfo) & b->mask.clock) ? 1 : 0; |
88 | } | 88 | } |
89 | 89 | ||
90 | static struct i2c_adapter matrox_i2c_adapter_template = | 90 | static const struct i2c_algo_bit_data matrox_i2c_algo_template = |
91 | { | ||
92 | .owner = THIS_MODULE, | ||
93 | .id = I2C_HW_B_G400, | ||
94 | }; | ||
95 | |||
96 | static struct i2c_algo_bit_data matrox_i2c_algo_template = | ||
97 | { | 91 | { |
98 | .setsda = matroxfb_gpio_setsda, | 92 | .setsda = matroxfb_gpio_setsda, |
99 | .setscl = matroxfb_gpio_setscl, | 93 | .setscl = matroxfb_gpio_setscl, |
@@ -112,7 +106,7 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo, | |||
112 | b->minfo = minfo; | 106 | b->minfo = minfo; |
113 | b->mask.data = data; | 107 | b->mask.data = data; |
114 | b->mask.clock = clock; | 108 | b->mask.clock = clock; |
115 | b->adapter = matrox_i2c_adapter_template; | 109 | b->adapter.owner = THIS_MODULE; |
116 | snprintf(b->adapter.name, sizeof(b->adapter.name), name, | 110 | snprintf(b->adapter.name, sizeof(b->adapter.name), name, |
117 | minfo->fbcon.node); | 111 | minfo->fbcon.node); |
118 | i2c_set_adapdata(&b->adapter, b); | 112 | i2c_set_adapdata(&b->adapter, b); |
@@ -187,6 +181,17 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) { | |||
187 | MAT_DATA, MAT_CLK, "MAVEN:fb%u", 0); | 181 | MAT_DATA, MAT_CLK, "MAVEN:fb%u", 0); |
188 | if (err) | 182 | if (err) |
189 | printk(KERN_INFO "i2c-matroxfb: Could not register Maven i2c bus. Continuing anyway.\n"); | 183 | printk(KERN_INFO "i2c-matroxfb: Could not register Maven i2c bus. Continuing anyway.\n"); |
184 | else { | ||
185 | struct i2c_board_info maven_info = { | ||
186 | I2C_BOARD_INFO("maven", 0x1b), | ||
187 | }; | ||
188 | unsigned short const addr_list[2] = { | ||
189 | 0x1b, I2C_CLIENT_END | ||
190 | }; | ||
191 | |||
192 | i2c_new_probed_device(&m2info->maven.adapter, | ||
193 | &maven_info, addr_list); | ||
194 | } | ||
190 | } | 195 | } |
191 | return m2info; | 196 | return m2info; |
192 | fail_ddc1:; | 197 | fail_ddc1:; |