intelfb: add preliminary i2c support
[safe/jmp/linux-2.6] / drivers / video / intelfb / intelfbdrv.c
index 08f8241..f6e30b3 100644 (file)
@@ -474,6 +474,11 @@ cleanup(struct intelfb_info *dinfo)
                agp_free_memory(dinfo->gtt_ring_mem);
        }
 
+#ifdef CONFIG_FB_INTEL_I2C
+       /* un-register I2C bus */
+       intelfb_delete_i2c_busses(dinfo);
+#endif
+
        if (dinfo->mmio_base)
                iounmap((void __iomem *)dinfo->mmio_base);
        if (dinfo->aperture.virtual)
@@ -851,6 +856,11 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (bailearly == 5)
                bailout(dinfo);
 
+#ifdef CONFIG_FB_INTEL_I2C
+       /* register I2C bus */
+       intelfb_create_i2c_busses(dinfo);
+#endif
+
        if (bailearly == 6)
                bailout(dinfo);
 
@@ -900,6 +910,8 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
        init_waitqueue_head(&dinfo->vsync.wait);
        spin_lock_init(&dinfo->int_lock);
        dinfo->irq_flags = 0;
+       dinfo->vsync.pan_display = 0;
+       dinfo->vsync.pan_offset = 0;
 
        return 0;