forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/video/fbdev/sstfb.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/drivers/video/sstfb.c -- voodoo graphics frame buffer
34 *
....@@ -732,7 +733,7 @@
732733 {
733734 struct fb_info *info = dev_get_drvdata(device);
734735 struct sstfb_par *par = info->par;
735
- return snprintf(buf, PAGE_SIZE, "%d\n", par->vgapass);
736
+ return sprintf(buf, "%d\n", par->vgapass);
736737 }
737738
738739 static struct device_attribute device_attrs[] = {
....@@ -1306,7 +1307,7 @@
13061307 }
13071308
13081309
1309
-static struct fb_ops sstfb_ops = {
1310
+static const struct fb_ops sstfb_ops = {
13101311 .owner = THIS_MODULE,
13111312 .fb_check_var = sstfb_check_var,
13121313 .fb_set_par = sstfb_set_par,
....@@ -1362,14 +1363,14 @@
13621363 goto fail_fb_mem;
13631364 }
13641365
1365
- par->mmio_vbase = ioremap_nocache(fix->mmio_start,
1366
+ par->mmio_vbase = ioremap(fix->mmio_start,
13661367 fix->mmio_len);
13671368 if (!par->mmio_vbase) {
13681369 printk(KERN_ERR "sstfb: cannot remap register area %#lx\n",
13691370 fix->mmio_start);
13701371 goto fail_mmio_remap;
13711372 }
1372
- info->screen_base = ioremap_nocache(fix->smem_start, 0x400000);
1373
+ info->screen_base = ioremap(fix->smem_start, 0x400000);
13731374 if (!info->screen_base) {
13741375 printk(KERN_ERR "sstfb: cannot remap framebuffer %#lx\n",
13751376 fix->smem_start);