diff options
author | Nicolas Boichat <nicolas@boichat.ch> | 2004-08-22 22:49:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 22:49:36 -0700 |
commit | 92b53939e20e01532c13c2b5fc3a44783677c7bf (patch) | |
tree | a5ca9407bc1d4002b7e926a607fd4b5cbb8d9c01 /drivers | |
parent | 1d59c3b9f040e05752aa934655b9048ef6878681 (diff) | |
download | history-92b53939e20e01532c13c2b5fc3a44783677c7bf.tar.gz |
[PATCH] Rivafb I2C fixes
The I2C busses opened by rivafb were deleted immediately after reading the
EDID, but they should be kept open, so user-space applications can use them.
They are now deleted when the driver is unloaded.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/riva/fbdev.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index fec70246027c71..354edb240a94ee 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c @@ -1876,7 +1876,6 @@ static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) #ifdef CONFIG_FB_RIVA_I2C par = (struct riva_par *) info->par; - riva_create_i2c_busses(par); for (i = par->bus; i >= 1; i--) { riva_probe_i2c_connector(par, i, &par->EDID); if (par->EDID) { @@ -1884,7 +1883,6 @@ static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) break; } } - riva_delete_i2c_busses(par); #endif #endif NVTRACE_LEAVE(); @@ -2038,6 +2036,10 @@ static int __devinit rivafb_probe(struct pci_dev *pd, } #endif /* CONFIG_MTRR */ +#ifdef CONFIG_FB_RIVA_I2C + riva_create_i2c_busses((struct riva_par *) info->par); +#endif + info->fbops = &riva_fb_ops; info->fix = rivafb_fix; riva_get_EDID(info, pd); @@ -2072,6 +2074,9 @@ static int __devinit rivafb_probe(struct pci_dev *pd, return 0; err_out_iounmap_fb: +#ifdef CONFIG_FB_RIVA_I2C + riva_delete_i2c_busses((struct riva_par *) info->par); +#endif iounmap(info->screen_base); err_out_free_base1: if (default_par->riva.Architecture == NV_ARCH_03) @@ -2101,6 +2106,10 @@ static void __exit rivafb_remove(struct pci_dev *pd) if (!info) return; +#ifdef CONFIG_FB_RIVA_I2C + riva_delete_i2c_busses(par); +#endif + unregister_framebuffer(info); #ifdef CONFIG_MTRR if (par->mtrr.vram_valid) |