hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/video/fbdev/mmp/fb/mmpfb.c
....@@ -1,23 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * linux/drivers/video/mmp/fb/mmpfb.c
34 * Framebuffer driver for Marvell Display controller.
45 *
56 * Copyright (C) 2012 Marvell Technology Group Ltd.
67 * Authors: Zhou Zhu <zzhu3@marvell.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful, but WITHOUT
14
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16
- * more details.
17
- *
18
- * You should have received a copy of the GNU General Public License along with
19
- * this program. If not, see <http://www.gnu.org/licenses/>.
20
- *
218 */
229 #include <linux/module.h>
2310 #include <linux/dma-mapping.h>
....@@ -103,8 +90,6 @@
10390 else
10491 return PIXFMT_BGR888UNPACK;
10592 }
106
-
107
- /* fall through */
10893 }
10994
11095 return -EINVAL;
....@@ -467,7 +452,7 @@
467452 return 0;
468453 }
469454
470
-static struct fb_ops mmpfb_ops = {
455
+static const struct fb_ops mmpfb_ops = {
471456 .owner = THIS_MODULE,
472457 .fb_blank = mmpfb_blank,
473458 .fb_check_var = mmpfb_check_var,
....@@ -535,7 +520,7 @@
535520 info->var.bits_per_pixel / 8;
536521 info->fbops = &mmpfb_ops;
537522 info->pseudo_palette = fbi->pseudo_palette;
538
- info->screen_base = fbi->fb_start;
523
+ info->screen_buffer = fbi->fb_start;
539524 info->screen_size = fbi->fb_size;
540525
541526 /* For FB framework: Allocate color map and Register framebuffer*/
....@@ -625,7 +610,6 @@
625610 ret = -ENOMEM;
626611 goto failed_destroy_mutex;
627612 }
628
- memset(fbi->fb_start, 0, fbi->fb_size);
629613 dev_info(fbi->dev, "fb %dk allocated\n", fbi->fb_size/1024);
630614
631615 /* fb power on */