Commit 655d8183 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] drivers/video/* MOD_INC_USE_COUNT fixes

From: Christoph Hellwig <hch@lst.de>

A bunch of framebuffer drivers use MOD_INC_USE_COUNT to prevent themselves
from unloading completely - but we have a much easier way to do so, that is
simply removing the module_exit/cleanup_module handler.
parent de664d0c
......@@ -2819,8 +2819,6 @@ int __init atafb_init(void)
fb_info.node, fb_info.modename, screen_len>>10);
/* TODO: This driver cannot be unloaded yet */
MOD_INC_USE_COUNT;
return 0;
}
......@@ -3097,13 +3095,4 @@ int init_module(void)
{
return atafb_init();
}
void cleanup_module(void)
{
/* Not reached because the usecount will never
be decremented to zero */
unregister_framebuffer(&fb_info);
/* atari_stram_free( screen_base ); */
/* TODO: further clean up ... */
}
#endif /* MODULE */
......@@ -1065,7 +1065,6 @@ int __init cyberfb_init(void)
fb_info.node, fb_info.modename, CyberSize>>10);
/* TODO: This driver cannot be unloaded yet */
MOD_INC_USE_COUNT;
DPRINTK("EXIT\n");
return 0;
}
......@@ -1206,14 +1205,6 @@ int init_module(void)
{
return cyberfb_init();
}
void cleanup_module(void)
{
/* Not reached because the usecount will never be
decremented to zero */
unregister_framebuffer(&fb_info);
/* TODO: clean up ... */
}
#endif /* MODULE */
/*
......
......@@ -1432,8 +1432,6 @@ int __init retz3fb_init(void)
fb_info->modename, zinfo->fbsize>>10);
/* FIXME: This driver cannot be unloaded yet */
MOD_INC_USE_COUNT;
res = 0;
}
return res;
......@@ -1491,16 +1489,6 @@ int init_module(void)
{
return retz3fb_init();
}
void cleanup_module(void)
{
/*
* Not reached because the usecount will never
* be decremented to zero
*
* FIXME: clean up ... *
*/
}
#endif
......
......@@ -1765,8 +1765,6 @@ static int __init sa1100fb_probe(struct device *dev)
#endif
/* This driver cannot be unloaded at the moment */
MOD_INC_USE_COUNT;
return 0;
failed:
......
......@@ -1809,7 +1809,6 @@ int __init virgefb_init(void)
/* TODO: This driver cannot be unloaded yet */
MOD_INC_USE_COUNT;
DPRINTK("EXIT\n");
return 0;
}
......@@ -2064,14 +2063,6 @@ int init_module(void)
{
return virgefb_init();
}
void cleanup_module(void)
{
/* Not reached because the usecount will never be
decremented to zero */
unregister_framebuffer(&fb_info);
/* TODO: clean up ... */
}
#endif /* MODULE */
static int cv3d_has_4mb(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment