| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* cg3.c: CGTHREE frame buffer driver |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
|---|
| .. | .. |
|---|
| 38 | 39 | * Frame buffer operations |
|---|
| 39 | 40 | */ |
|---|
| 40 | 41 | |
|---|
| 41 | | -static struct fb_ops cg3_ops = { |
|---|
| 42 | +static const struct fb_ops cg3_ops = { |
|---|
| 42 | 43 | .owner = THIS_MODULE, |
|---|
| 43 | 44 | .fb_setcolreg = cg3_setcolreg, |
|---|
| 44 | 45 | .fb_blank = cg3_blank, |
|---|
| .. | .. |
|---|
| 246 | 247 | static void cg3_init_fix(struct fb_info *info, int linebytes, |
|---|
| 247 | 248 | struct device_node *dp) |
|---|
| 248 | 249 | { |
|---|
| 249 | | - strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); |
|---|
| 250 | + snprintf(info->fix.id, sizeof(info->fix.id), "%pOFn", dp); |
|---|
| 250 | 251 | |
|---|
| 251 | 252 | info->fix.type = FB_TYPE_PACKED_PIXELS; |
|---|
| 252 | 253 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
|---|
| .. | .. |
|---|
| 369 | 370 | info->var.red.length = 8; |
|---|
| 370 | 371 | info->var.green.length = 8; |
|---|
| 371 | 372 | info->var.blue.length = 8; |
|---|
| 372 | | - if (!strcmp(dp->name, "cgRDI")) |
|---|
| 373 | + if (of_node_name_eq(dp, "cgRDI")) |
|---|
| 373 | 374 | par->flags |= CG3_FLAG_RDI; |
|---|
| 374 | 375 | if (par->flags & CG3_FLAG_RDI) |
|---|
| 375 | 376 | cg3_rdi_maybe_fixup_var(&info->var, dp); |
|---|