forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/video/fbdev/gxt4500.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Frame buffer device for IBM GXT4500P/6500P and GXT4000P/6000P
34 * display adaptors
....@@ -533,7 +534,7 @@
533534 break;
534535 case DFA_PIX_32BIT:
535536 val |= (reg << 24);
536
- /* fall through */
537
+ fallthrough;
537538 case DFA_PIX_24BIT:
538539 val |= (reg << 16) | (reg << 8);
539540 break;
....@@ -598,7 +599,7 @@
598599 .mmio_len = 0x20000,
599600 };
600601
601
-static struct fb_ops gxt4500_ops = {
602
+static const struct fb_ops gxt4500_ops = {
602603 .owner = THIS_MODULE,
603604 .fb_check_var = gxt4500_check_var,
604605 .fb_set_par = gxt4500_set_par,
....@@ -642,10 +643,9 @@
642643 }
643644
644645 info = framebuffer_alloc(sizeof(struct gxt4500_par), &pdev->dev);
645
- if (!info) {
646
- dev_err(&pdev->dev, "gxt4500: cannot alloc FB info record\n");
646
+ if (!info)
647647 goto err_free_fb;
648
- }
648
+
649649 par = info->par;
650650 cardtype = ent->driver_data;
651651 par->refclk_ps = cardinfo[cardtype].refclk_ps;