nvidiafb: Delete i2c bus on driver unload
PATCH 5/7 nvidiafb: Delete i2c bus on driver unload
The driver nvidiafb fails to delete the i2c bus on load failure or unload. Fix
From: Antonino Daplas <[email protected]>
Signed-off-by Antonino Daplas <[email protected]>
---
nv_i2c.c | 2 -- nv_of.c | 1 + nv_proto.h | 2 ++ nvidia.c | 6 ++++-- 4 files changed, 7 insertions(+), 4 deletions(-)
drivers/video/nvidia/nv_i2c.c +0 -2
@@ -146,7 +146,6 @@nvidia_setup_i2c_bus (&par->chan[2 ],"BUS3" ); } -#if 0 void nvidia_delete_i2c_busses (struct nvidia_par *par) {if (par->chan[0 ].par)
@@ -162,7 +161,6 @@ par->chan[2 ].par =NULL ; } -#endif /* 0 */ static u8 *nvidia_do_probe_i2c_edid (struct nvidia_i2c_chan *chan) {
drivers/video/nvidia/nv_of.c +1 -0
@@ -28,6 +28,7 @@#include "nv_proto.h" void nvidia_create_i2c_busses (struct nvidia_par *par) {} +void nvidia_delete_i2c_busses (struct nvidia_par *par) {}int nvidia_probe_i2c_connector (struct nvidia_par *par,int conn,u8 **out_edid) {
drivers/video/nvidia/nv_proto.h +2 -0
@@ -33,10 +33,12 @@/* in nvidia-i2c.c */ #if defined(CONFIG_FB_NVIDIA_I2C ) || defined (CONFIG_PPC_OF )void nvidia_create_i2c_busses (struct nvidia_par *par); +void nvidia_delete_i2c_busses (struct nvidia_par *par);int nvidia_probe_i2c_connector (struct nvidia_par *par,int conn,u8 ** out_edid);#else #define nvidia_create_i2c_busses (...) +#define nvidia_delete_i2c_busses (...)#define nvidia_probe_i2c_connector (p, c, edid) \ do { \ *(edid) = NULL; \
drivers/video/nvidia/nvidia.c +4 -2
@@ -1566,8 +1566,9 @@ err_out_iounmap_fb:iounmap (info->screen_base); - err_out_free_base1:fb_destroy_modedb (info->monspecs.modedb); +nvidia_delete_i2c_busses (par); + err_out_free_base1:iounmap (par->REGS); err_out_free_base0:pci_release_regions (pd);
@@ -1597,9 +1598,10 @@ info->fix.smem_len);#endif /* CONFIG_MTRR */ +iounmap (info->screen_base);fb_destroy_modedb (info->monspecs.modedb); +nvidia_delete_i2c_busses (par);iounmap (par->REGS); -iounmap (info->screen_base);pci_release_regions (pd);pci_disable_device (pd);kfree (info->pixmap.addr);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click