fbdev: atafb: Remove obsolete module support

CONFIG_FB_ATARI is bool, hence the Atari frame buffer driver cannot be
built as a module.  In addition, the module support code refers to a
function atafb_deinit(), which never existed.

Replace module_init() by device_initcall().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitzmic@gmail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
Geert Uytterhoeven 2019-04-01 17:46:55 +02:00 committed by Bartlomiej Zolnierkiewicz
parent e4bedbb625
commit 577eabb2cb
5 changed files with 1 additions and 107 deletions

View File

@ -47,7 +47,6 @@
#define ATAFB_EXT #define ATAFB_EXT
#define ATAFB_FALCON #define ATAFB_FALCON
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/string.h> #include <linux/string.h>
@ -3078,14 +3077,11 @@ int __init atafb_init(void)
int pad, detected_mode, error; int pad, detected_mode, error;
unsigned int defmode = 0; unsigned int defmode = 0;
unsigned long mem_req; unsigned long mem_req;
#ifndef MODULE
char *option = NULL; char *option = NULL;
if (fb_get_options("atafb", &option)) if (fb_get_options("atafb", &option))
return -ENODEV; return -ENODEV;
atafb_setup(option); atafb_setup(option);
#endif
printk("atafb_init: start\n"); printk("atafb_init: start\n");
if (!MACH_IS_ATARI) if (!MACH_IS_ATARI)
@ -3251,14 +3247,4 @@ int __init atafb_init(void)
return 0; return 0;
} }
module_init(atafb_init); device_initcall(atafb_init);
#ifdef MODULE
MODULE_LICENSE("GPL");
int cleanup_module(void)
{
unregister_framebuffer(&fb_info);
return atafb_deinit();
}
#endif /* MODULE */

View File

@ -10,7 +10,6 @@
* more details. * more details.
*/ */
#include <linux/module.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/fb.h> #include <linux/fb.h>
@ -269,25 +268,3 @@ void atafb_iplan2p2_linefill(struct fb_info *info, u_long next_line,
if (width) if (width)
fill8_2col((u8 *)dest, fgcolor, bgcolor, *data); fill8_2col((u8 *)dest, fgcolor, bgcolor, *data);
} }
#ifdef MODULE
MODULE_LICENSE("GPL");
int init_module(void)
{
return 0;
}
void cleanup_module(void)
{
}
#endif /* MODULE */
/*
* Visible symbols for modules
*/
EXPORT_SYMBOL(atafb_iplan2p2_copyarea);
EXPORT_SYMBOL(atafb_iplan2p2_fillrect);
EXPORT_SYMBOL(atafb_iplan2p2_linefill);

View File

@ -10,7 +10,6 @@
* more details. * more details.
*/ */
#include <linux/module.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/fb.h> #include <linux/fb.h>
@ -284,25 +283,3 @@ void atafb_iplan2p4_linefill(struct fb_info *info, u_long next_line,
if (width) if (width)
fill8_2col((u8 *)dest, fgcolor, bgcolor, *data); fill8_2col((u8 *)dest, fgcolor, bgcolor, *data);
} }
#ifdef MODULE
MODULE_LICENSE("GPL");
int init_module(void)
{
return 0;
}
void cleanup_module(void)
{
}
#endif /* MODULE */
/*
* Visible symbols for modules
*/
EXPORT_SYMBOL(atafb_iplan2p4_copyarea);
EXPORT_SYMBOL(atafb_iplan2p4_fillrect);
EXPORT_SYMBOL(atafb_iplan2p4_linefill);

View File

@ -10,7 +10,6 @@
* more details. * more details.
*/ */
#include <linux/module.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/fb.h> #include <linux/fb.h>
@ -321,25 +320,3 @@ void atafb_iplan2p8_linefill(struct fb_info *info, u_long next_line,
if (width) if (width)
fill8_2col((u8 *)dest, fgcolor, bgcolor, *data); fill8_2col((u8 *)dest, fgcolor, bgcolor, *data);
} }
#ifdef MODULE
MODULE_LICENSE("GPL");
int init_module(void)
{
return 0;
}
void cleanup_module(void)
{
}
#endif /* MODULE */
/*
* Visible symbols for modules
*/
EXPORT_SYMBOL(atafb_iplan2p8_copyarea);
EXPORT_SYMBOL(atafb_iplan2p8_fillrect);
EXPORT_SYMBOL(atafb_iplan2p8_linefill);

View File

@ -9,7 +9,6 @@
* more details. * more details.
*/ */
#include <linux/module.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/fb.h> #include <linux/fb.h>
@ -88,25 +87,3 @@ void atafb_mfb_linefill(struct fb_info *info, u_long next_line,
*dest++ = *data++; *dest++ = *data++;
} }
} }
#ifdef MODULE
MODULE_LICENSE("GPL");
int init_module(void)
{
return 0;
}
void cleanup_module(void)
{
}
#endif /* MODULE */
/*
* Visible symbols for modules
*/
EXPORT_SYMBOL(atafb_mfb_copyarea);
EXPORT_SYMBOL(atafb_mfb_fillrect);
EXPORT_SYMBOL(atafb_mfb_linefill);