| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 9 | 10 | * York Sun <yorksun@freescale.com> |
|---|
| 10 | 11 | * |
|---|
| 11 | 12 | * Based on imxfb.c Copyright (C) 2004 S.Hauer, Pengutronix |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 14 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 15 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 16 | | - * option) any later version. |
|---|
| 17 | | - * |
|---|
| 18 | 13 | */ |
|---|
| 19 | 14 | |
|---|
| 20 | 15 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 1292 | 1287 | dev_warn(info->dev, |
|---|
| 1293 | 1288 | "MFB_SET_PIXFMT value of 0x%08x is deprecated.\n", |
|---|
| 1294 | 1289 | MFB_SET_PIXFMT_OLD); |
|---|
| 1290 | + fallthrough; |
|---|
| 1295 | 1291 | case MFB_SET_PIXFMT: |
|---|
| 1296 | 1292 | if (copy_from_user(&pix_fmt, buf, sizeof(pix_fmt))) |
|---|
| 1297 | 1293 | return -EFAULT; |
|---|
| .. | .. |
|---|
| 1301 | 1297 | dev_warn(info->dev, |
|---|
| 1302 | 1298 | "MFB_GET_PIXFMT value of 0x%08x is deprecated.\n", |
|---|
| 1303 | 1299 | MFB_GET_PIXFMT_OLD); |
|---|
| 1300 | + fallthrough; |
|---|
| 1304 | 1301 | case MFB_GET_PIXFMT: |
|---|
| 1305 | 1302 | pix_fmt = ad->pix_fmt; |
|---|
| 1306 | 1303 | if (copy_to_user(buf, &pix_fmt, sizeof(pix_fmt))) |
|---|
| .. | .. |
|---|
| 1453 | 1450 | return res; |
|---|
| 1454 | 1451 | } |
|---|
| 1455 | 1452 | |
|---|
| 1456 | | -static struct fb_ops fsl_diu_ops = { |
|---|
| 1453 | +static const struct fb_ops fsl_diu_ops = { |
|---|
| 1457 | 1454 | .owner = THIS_MODULE, |
|---|
| 1458 | 1455 | .fb_check_var = fsl_diu_check_var, |
|---|
| 1459 | 1456 | .fb_set_par = fsl_diu_set_par, |
|---|
| .. | .. |
|---|
| 1575 | 1572 | |
|---|
| 1576 | 1573 | unregister_framebuffer(info); |
|---|
| 1577 | 1574 | unmap_video_memory(info); |
|---|
| 1578 | | - if (&info->cmap) |
|---|
| 1579 | | - fb_dealloc_cmap(&info->cmap); |
|---|
| 1575 | + fb_dealloc_cmap(&info->cmap); |
|---|
| 1580 | 1576 | |
|---|
| 1581 | 1577 | mfbi->registered = 0; |
|---|
| 1582 | 1578 | } |
|---|
| .. | .. |
|---|
| 1925 | 1921 | pr_info("Freescale Display Interface Unit (DIU) framebuffer driver\n"); |
|---|
| 1926 | 1922 | |
|---|
| 1927 | 1923 | #ifdef CONFIG_NOT_COHERENT_CACHE |
|---|
| 1928 | | - np = of_find_node_by_type(NULL, "cpu"); |
|---|
| 1924 | + np = of_get_cpu_node(0, NULL); |
|---|
| 1929 | 1925 | if (!np) { |
|---|
| 1930 | 1926 | pr_err("fsl-diu-fb: can't find 'cpu' device node\n"); |
|---|
| 1931 | 1927 | return -ENODEV; |
|---|