| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * PS3 flash memory os area. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2006 Sony Computer Entertainment Inc. |
|---|
| 5 | 6 | * Copyright 2006 Sony Corp. |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 9 | | - * the Free Software Foundation; version 2 of the License. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | | - * GNU General Public License for more details. |
|---|
| 15 | | - * |
|---|
| 16 | | - * You should have received a copy of the GNU General Public License |
|---|
| 17 | | - * along with this program; if not, write to the Free Software |
|---|
| 18 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 19 | 7 | */ |
|---|
| 20 | 8 | |
|---|
| 21 | 9 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 205 | 193 | * 3) The number of seconds from 1970 to 2000. |
|---|
| 206 | 194 | */ |
|---|
| 207 | 195 | |
|---|
| 208 | | -struct saved_params { |
|---|
| 196 | +static struct saved_params { |
|---|
| 209 | 197 | unsigned int valid; |
|---|
| 210 | 198 | s64 rtc_diff; |
|---|
| 211 | 199 | unsigned int av_multi_out; |
|---|
| 212 | | -} static saved_params; |
|---|
| 200 | +} saved_params; |
|---|
| 213 | 201 | |
|---|
| 214 | 202 | static struct property property_rtc_diff = { |
|---|
| 215 | 203 | .name = "linux,rtc_diff", |
|---|
| .. | .. |
|---|
| 625 | 613 | /* Read in header and db from flash. */ |
|---|
| 626 | 614 | |
|---|
| 627 | 615 | header = kmalloc(buf_len, GFP_KERNEL); |
|---|
| 628 | | - if (!header) { |
|---|
| 629 | | - pr_debug("%s: kmalloc failed\n", __func__); |
|---|
| 616 | + if (!header) |
|---|
| 630 | 617 | return -ENOMEM; |
|---|
| 631 | | - } |
|---|
| 632 | 618 | |
|---|
| 633 | 619 | count = os_area_flash_read(header, buf_len, 0); |
|---|
| 634 | 620 | if (count < 0) { |
|---|