summaryrefslogtreecommitdiffstats
path: root/drivers/video/igafb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/igafb.c')
-rw-r--r--drivers/video/igafb.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index dbf56108c..5ed528af2 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -217,7 +217,7 @@ static int igafb_get_fix(struct fb_fix_screeninfo *fix, int con,
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
strcpy(fix->id, igafb_name);
- fix->smem_start = (char *)fb->frame_buffer;
+ fix->smem_start = fb->frame_buffer;
fix->smem_len = fb->total_vram;
fix->xpanstep = 0;
fix->ypanstep = 0;
@@ -559,7 +559,7 @@ static void igafb_blank(int blank, struct fb_info *info)
}
-__initfunc(static int iga_init(struct fb_info_iga *info))
+static int __init iga_init(struct fb_info_iga *info)
{
char vramsz = iga_inb(info, IGA_EXT_CNTRL, IGA_IDX_EXT_BUS_CNTL)
& MEM_SIZE_ALIAS;
@@ -624,7 +624,7 @@ __initfunc(static int iga_init(struct fb_info_iga *info))
}
-__initfunc(void igafb_init(void))
+int __init igafb_init(void)
{
struct pci_dev *pdev;
struct fb_info_iga *info;
@@ -634,7 +634,7 @@ __initfunc(void igafb_init(void))
/* Do not attach when we have a serial console. */
if (!con_is_present())
- return;
+ return -ENXIO;
pdev = pci_find_device(PCI_VENDOR_ID_INTERG,
PCI_DEVICE_ID_INTERG_1682, 0);
@@ -642,28 +642,28 @@ __initfunc(void igafb_init(void))
pdev = pci_find_device(PCI_VENDOR_ID_INTERG,
0x2000, 0);
if(pdev == NULL)
- return;
+ return -ENXIO;
iga2000 = 1;
}
info = kmalloc(sizeof(struct fb_info_iga), GFP_ATOMIC);
if (!info) {
printk("igafb_init: can't alloc fb_info_iga\n");
- return;
+ return -ENOMEM;
}
memset(info, 0, sizeof(struct fb_info_iga));
- info->frame_buffer = pdev->base_address[0];
+ info->frame_buffer = pdev->resource[0].start;
if (!info->frame_buffer) {
kfree(info);
- return;
+ return -ENXIO;
}
pcibios_read_config_dword(0, pdev->devfn,
PCI_BASE_ADDRESS_0,
(unsigned int*)&addr);
if (!addr)
- return;
+ return -ENXIO;
info->frame_buffer_phys = addr & PCI_BASE_ADDRESS_MEM_MASK;
#ifdef __sparc__
@@ -684,7 +684,7 @@ __initfunc(void igafb_init(void))
}
if (!info->io_base) {
kfree(info);
- return;
+ return -ENXIO;
}
/*
@@ -700,7 +700,7 @@ __initfunc(void igafb_init(void))
printk("igafb_init: can't alloc mmap_map\n");
/* XXX Here we left I/O allocated */
kfree(info);
- return;
+ return -ENOMEM;
}
memset(info->mmap_map, 0, 4 * sizeof(*info->mmap_map));
@@ -775,14 +775,16 @@ __initfunc(void igafb_init(void))
info->mmap_map[1].prot_mask = SRMMU_CACHE;
info->mmap_map[1].prot_flag = SRMMU_WRITE;
#endif /* __sparc__ */
+
+ return 0;
}
-__initfunc(void igafb_setup(char *options, int *ints))
+int __init igafb_setup(char *options)
{
char *this_opt;
if (!options || !*options)
- return;
+ return 0;
for (this_opt = strtok(options, ","); this_opt;
this_opt = strtok(NULL, ",")) {
@@ -798,4 +800,5 @@ __initfunc(void igafb_setup(char *options, int *ints))
fontname[i] = 0;
}
}
+ return 0;
}