aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/intelfb/intelfb_i2c.c
diff options
context:
space:
mode:
authorDennis Munsie <dmunsie@cecropia.com>2006-06-20 14:55:55 -0400
committerDave Airlie <airlied@linux.ie>2006-07-03 05:04:37 -0400
commit7627899b11ece118b46fbf652e944f9a239f6cd1 (patch)
treecd0e9e56a144193b64885fb6a1eb3a2068e4f168 /drivers/video/intelfb/intelfb_i2c.c
parent1f6e8449e11fd79ee30456ce7ec973317b8dd6ae (diff)
intelfb: add preliminary i2c support
Adds code to unregister the I2C buses in the cleanup function. Signed-off-by: Dennis Munsie <dmunsie@cecropia.com>
Diffstat (limited to 'drivers/video/intelfb/intelfb_i2c.c')
-rw-r--r--drivers/video/intelfb/intelfb_i2c.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/video/intelfb/intelfb_i2c.c b/drivers/video/intelfb/intelfb_i2c.c
index d73572355c57..c1113d6e941d 100644
--- a/drivers/video/intelfb/intelfb_i2c.c
+++ b/drivers/video/intelfb/intelfb_i2c.c
@@ -182,3 +182,19 @@ void intelfb_create_i2c_busses(struct intelfb_info *dinfo)
182 } 182 }
183 dinfo->num_outputs = i; 183 dinfo->num_outputs = i;
184} 184}
185
186void intelfb_delete_i2c_busses(struct intelfb_info *dinfo)
187{
188 int i;
189
190 for (i = 0; i < MAX_OUTPUTS; i++) {
191 if (dinfo->output[i].i2c_bus.dinfo) {
192 i2c_bit_del_bus(&dinfo->output[i].i2c_bus.adapter);
193 dinfo->output[i].i2c_bus.dinfo = NULL;
194 }
195 if (dinfo->output[i].ddc_bus.dinfo) {
196 i2c_bit_del_bus(&dinfo->output[i].ddc_bus.adapter);
197 dinfo->output[i].ddc_bus.dinfo = NULL;
198 }
199 }
200}