forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/video/fbdev/cg3.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* cg3.c: CGTHREE frame buffer driver
23 *
34 * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net)
....@@ -38,7 +39,7 @@
3839 * Frame buffer operations
3940 */
4041
41
-static struct fb_ops cg3_ops = {
42
+static const struct fb_ops cg3_ops = {
4243 .owner = THIS_MODULE,
4344 .fb_setcolreg = cg3_setcolreg,
4445 .fb_blank = cg3_blank,
....@@ -246,7 +247,7 @@
246247 static void cg3_init_fix(struct fb_info *info, int linebytes,
247248 struct device_node *dp)
248249 {
249
- strlcpy(info->fix.id, dp->name, sizeof(info->fix.id));
250
+ snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp);
250251
251252 info->fix.type = FB_TYPE_PACKED_PIXELS;
252253 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
....@@ -369,7 +370,7 @@
369370 info->var.red.length = 8;
370371 info->var.green.length = 8;
371372 info->var.blue.length = 8;
372
- if (!strcmp(dp->name, "cgRDI"))
373
+ if (of_node_name_eq(dp, "cgRDI"))
373374 par->flags |= CG3_FLAG_RDI;
374375 if (par->flags & CG3_FLAG_RDI)
375376 cg3_rdi_maybe_fixup_var(&info->var, dp);