diff options
Diffstat (limited to 'drivers/video/fbdev/grvga.c')
| -rw-r--r-- | drivers/video/fbdev/grvga.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/video/fbdev/grvga.c b/drivers/video/fbdev/grvga.c index 8fc8f46dadeb..de8ab817d406 100644 --- a/drivers/video/fbdev/grvga.c +++ b/drivers/video/fbdev/grvga.c @@ -1,24 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Driver for Aeroflex Gaisler SVGACTRL framebuffer device. * * 2011 (c) Aeroflex Gaisler AB * * Full documentation of the core can be found here: - * http://www.gaisler.com/products/grlib/grip.pdf - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. + * https://www.gaisler.com/products/grlib/grip.pdf * * Contributors: Kristoffer Glembo <kristoffer@gaisler.com> - * */ #include <linux/platform_device.h> #include <linux/dma-mapping.h> -#include <linux/of_platform.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/string.h> @@ -256,15 +250,13 @@ static int grvga_pan_display(struct fb_var_screeninfo *var, return 0; } -static struct fb_ops grvga_ops = { +static const struct fb_ops grvga_ops = { .owner = THIS_MODULE, + FB_DEFAULT_IOMEM_OPS, .fb_check_var = grvga_check_var, .fb_set_par = grvga_set_par, .fb_setcolreg = grvga_setcolreg, .fb_pan_display = grvga_pan_display, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit }; static int grvga_parse_custom(char *options, @@ -341,10 +333,8 @@ static int grvga_probe(struct platform_device *dev) char *options = NULL, *mode_opt = NULL; info = framebuffer_alloc(sizeof(struct grvga_par), &dev->dev); - if (!info) { - dev_err(&dev->dev, "framebuffer_alloc failed\n"); + if (!info) return -ENOMEM; - } /* Expecting: "grvga: modestring, [addr:<framebuffer physical address>], [size:<framebuffer size>] * @@ -384,7 +374,7 @@ static int grvga_probe(struct platform_device *dev) info->fbops = &grvga_ops; info->fix = grvga_fix; info->pseudo_palette = par->color_palette; - info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK | FBINFO_HWACCEL_YPAN; + info->flags = FBINFO_PARTIAL_PAN_OK | FBINFO_HWACCEL_YPAN; info->fix.smem_len = grvga_mem_size; if (!devm_request_mem_region(&dev->dev, dev->resource[0].start, @@ -511,7 +501,7 @@ free_fb: return retval; } -static int grvga_remove(struct platform_device *device) +static void grvga_remove(struct platform_device *device) { struct fb_info *info = dev_get_drvdata(&device->dev); struct grvga_par *par; @@ -531,8 +521,6 @@ static int grvga_remove(struct platform_device *device) framebuffer_release(info); } - - return 0; } static struct of_device_id svgactrl_of_match[] = { |
