mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 18:26:36 +07:00
fb: pvr2fb: Fix up section mismatch warnings.
A few minor things were broken here. fix and var screeninfo should have been __devinitdata, board_list[] gets renamed to board_driver[] so the modpost matching does the right thing, and we properly discard some of the unused exit sections. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
989e5ab3e8
commit
e9705a77f5
@ -147,16 +147,16 @@ static struct pvr2fb_par {
|
||||
|
||||
static struct fb_info *fb_info;
|
||||
|
||||
static struct fb_fix_screeninfo pvr2_fix __initdata = {
|
||||
static struct fb_fix_screeninfo pvr2_fix __devinitdata = {
|
||||
.id = "NEC PowerVR2",
|
||||
.type = FB_TYPE_PACKED_PIXELS,
|
||||
.visual = FB_VISUAL_TRUECOLOR,
|
||||
.type = FB_TYPE_PACKED_PIXELS,
|
||||
.visual = FB_VISUAL_TRUECOLOR,
|
||||
.ypanstep = 1,
|
||||
.ywrapstep = 1,
|
||||
.accel = FB_ACCEL_NONE,
|
||||
.accel = FB_ACCEL_NONE,
|
||||
};
|
||||
|
||||
static struct fb_var_screeninfo pvr2_var __initdata = {
|
||||
static struct fb_var_screeninfo pvr2_var __devinitdata = {
|
||||
.xres = 640,
|
||||
.yres = 480,
|
||||
.xres_virtual = 640,
|
||||
@ -195,10 +195,6 @@ static unsigned int shdma = PVR2_CASCADE_CHAN;
|
||||
static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS;
|
||||
#endif
|
||||
|
||||
/* Interface used by the world */
|
||||
|
||||
int pvr2fb_setup(char*);
|
||||
|
||||
static int pvr2fb_setcolreg(unsigned int regno, unsigned int red, unsigned int green, unsigned int blue,
|
||||
unsigned int transp, struct fb_info *info);
|
||||
static int pvr2fb_blank(int blank, struct fb_info *info);
|
||||
@ -227,7 +223,7 @@ static struct fb_ops pvr2fb_ops = {
|
||||
#ifdef CONFIG_SH_DMA
|
||||
.fb_write = pvr2fb_write,
|
||||
#endif
|
||||
.fb_fillrect = cfb_fillrect,
|
||||
.fb_fillrect = cfb_fillrect,
|
||||
.fb_copyarea = cfb_copyarea,
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
};
|
||||
@ -293,7 +289,7 @@ static void set_color_bitfields(struct fb_var_screeninfo *var)
|
||||
{
|
||||
switch (var->bits_per_pixel) {
|
||||
case 16: /* RGB 565 */
|
||||
pvr2fb_set_pal_type(PAL_RGB565);
|
||||
pvr2fb_set_pal_type(PAL_RGB565);
|
||||
var->red.offset = 11; var->red.length = 5;
|
||||
var->green.offset = 5; var->green.length = 6;
|
||||
var->blue.offset = 0; var->blue.length = 5;
|
||||
@ -306,7 +302,7 @@ static void set_color_bitfields(struct fb_var_screeninfo *var)
|
||||
var->transp.offset = 0; var->transp.length = 0;
|
||||
break;
|
||||
case 32: /* ARGB 8888 */
|
||||
pvr2fb_set_pal_type(PAL_ARGB8888);
|
||||
pvr2fb_set_pal_type(PAL_ARGB8888);
|
||||
var->red.offset = 16; var->red.length = 8;
|
||||
var->green.offset = 8; var->green.length = 8;
|
||||
var->blue.offset = 0; var->blue.length = 8;
|
||||
@ -470,7 +466,7 @@ static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
var->xoffset = var->yoffset = 0;
|
||||
} else {
|
||||
if (var->xoffset > var->xres_virtual - var->xres ||
|
||||
var->yoffset > var->yres_virtual - var->yres ||
|
||||
var->yoffset > var->yres_virtual - var->yres ||
|
||||
var->xoffset < 0 || var->yoffset < 0)
|
||||
var->xoffset = var->yoffset = 0;
|
||||
}
|
||||
@ -779,7 +775,7 @@ static int __init pvr2fb_common_init(void)
|
||||
}
|
||||
|
||||
par->mmio_base = (unsigned long)ioremap_nocache(pvr2_fix.mmio_start,
|
||||
pvr2_fix.mmio_len);
|
||||
pvr2_fix.mmio_len);
|
||||
if (!par->mmio_base) {
|
||||
printk(KERN_ERR "pvr2fb: Failed to remap mmio space\n");
|
||||
goto out_err;
|
||||
@ -903,7 +899,7 @@ static int __init pvr2fb_dc_init(void)
|
||||
return pvr2fb_common_init();
|
||||
}
|
||||
|
||||
static void pvr2fb_dc_exit(void)
|
||||
static void __exit pvr2fb_dc_exit(void)
|
||||
{
|
||||
if (fb_info->screen_base) {
|
||||
iounmap(fb_info->screen_base);
|
||||
@ -987,7 +983,7 @@ static int __init pvr2fb_pci_init(void)
|
||||
return pci_register_driver(&pvr2fb_pci_driver);
|
||||
}
|
||||
|
||||
static void pvr2fb_pci_exit(void)
|
||||
static void __exit pvr2fb_pci_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&pvr2fb_pci_driver);
|
||||
}
|
||||
@ -1021,7 +1017,7 @@ static int __init pvr2_get_param(const struct pvr2_params *p, const char *s,
|
||||
*/
|
||||
|
||||
#ifndef MODULE
|
||||
int __init pvr2fb_setup(char *options)
|
||||
static int __init pvr2fb_setup(char *options)
|
||||
{
|
||||
char *this_opt;
|
||||
char cable_arg[80];
|
||||
@ -1061,7 +1057,7 @@ static struct pvr2_board {
|
||||
int (*init)(void);
|
||||
void (*exit)(void);
|
||||
char name[16];
|
||||
} board_list[] = {
|
||||
} board_driver[] = {
|
||||
#ifdef CONFIG_SH_DREAMCAST
|
||||
{ pvr2fb_dc_init, pvr2fb_dc_exit, "Sega DC PVR2" },
|
||||
#endif
|
||||
@ -1071,7 +1067,7 @@ static struct pvr2_board {
|
||||
{ 0, },
|
||||
};
|
||||
|
||||
int __init pvr2fb_init(void)
|
||||
static int __init pvr2fb_init(void)
|
||||
{
|
||||
int i, ret = -ENODEV;
|
||||
int size;
|
||||
@ -1095,8 +1091,8 @@ int __init pvr2fb_init(void)
|
||||
|
||||
currentpar = (struct pvr2fb_par *)(fb_info + 1);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(board_list); i++) {
|
||||
struct pvr2_board *pvr_board = board_list + i;
|
||||
for (i = 0; i < ARRAY_SIZE(board_driver); i++) {
|
||||
struct pvr2_board *pvr_board = board_driver + i;
|
||||
|
||||
if (!pvr_board->init)
|
||||
continue;
|
||||
@ -1118,8 +1114,8 @@ static void __exit pvr2fb_exit(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(board_list); i++) {
|
||||
struct pvr2_board *pvr_board = board_list + i;
|
||||
for (i = 0; i < ARRAY_SIZE(board_driver); i++) {
|
||||
struct pvr2_board *pvr_board = board_driver + i;
|
||||
|
||||
if (pvr_board->exit)
|
||||
pvr_board->exit();
|
||||
@ -1139,4 +1135,3 @@ module_exit(pvr2fb_exit);
|
||||
MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>, M. R. Brown <mrbrown@0xd6.org>");
|
||||
MODULE_DESCRIPTION("Framebuffer driver for NEC PowerVR 2 based graphics boards");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user