* archive for more details.
  */
 
+#include <linux/aperture.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
                ret = -ENOMEM;
                goto err_fb_alloc;
        }
-       info->apertures = alloc_apertures(1);
-       if (!info->apertures) {
-               ret = -ENOMEM;
-               goto err_ioremap;
-       }
 
        /* XXX share VGA_FB_PHYS_BASE and I/O region with vgacon and others */
        info->screen_base = (void __iomem *)VGA_MAP_MEM(VGA_FB_PHYS_BASE, 0);
        info->fix = vga16fb_fix;
        /* supports rectangles with widths of multiples of 8 */
        info->pixmap.blit_x = 1 << 7 | 1 << 15 | 1 << 23 | 1 << 31;
-       info->flags = FBINFO_FLAG_DEFAULT | FBINFO_MISC_FIRMWARE |
-               FBINFO_HWACCEL_YPAN;
+       info->flags = FBINFO_FLAG_DEFAULT | FBINFO_HWACCEL_YPAN;
 
        i = (info->var.bits_per_pixel == 8) ? 256 : 16;
        ret = fb_alloc_cmap(&info->cmap, i, 0);
 
        vga16fb_update_fix(info);
 
-       info->apertures->ranges[0].base = VGA_FB_PHYS_BASE;
-       info->apertures->ranges[0].size = VGA_FB_PHYS_SIZE;
-
+       ret = devm_aperture_acquire_for_platform_device(dev, VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE);
+       if (ret)
+               goto err_check_var;
        if (register_framebuffer(info) < 0) {
                printk(KERN_ERR "vga16fb: unable to register framebuffer\n");
                ret = -EINVAL;