| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd |
|---|
| 3 | 4 | * Author: Tony Xie <tony.xie@rock-chips.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 7 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 12 | | - * more details. |
|---|
| 13 | | - * |
|---|
| 14 | 5 | */ |
|---|
| 15 | 6 | |
|---|
| 16 | 7 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 59 | 50 | return l2ctlr; |
|---|
| 60 | 51 | } |
|---|
| 61 | 52 | |
|---|
| 62 | | -static void rk3288_config_bootdata(void) |
|---|
| 53 | +static void __init rk3288_config_bootdata(void) |
|---|
| 63 | 54 | { |
|---|
| 64 | 55 | rkpm_bootdata_cpusp = rk3288_bootram_phy + (SZ_4K - 8); |
|---|
| 65 | 56 | rkpm_bootdata_cpu_code = __pa_symbol(cpu_resume); |
|---|
| .. | .. |
|---|
| 230 | 221 | pr_err("%s: Suspend finish failed\n", __func__); |
|---|
| 231 | 222 | } |
|---|
| 232 | 223 | |
|---|
| 233 | | -static int rk3288_suspend_init(struct device_node *np) |
|---|
| 224 | +static int __init rk3288_suspend_init(struct device_node *np) |
|---|
| 234 | 225 | { |
|---|
| 235 | 226 | struct device_node *sram_np; |
|---|
| 236 | 227 | struct resource res; |
|---|
| .. | .. |
|---|
| 266 | 257 | rk3288_bootram_base = of_iomap(sram_np, 0); |
|---|
| 267 | 258 | if (!rk3288_bootram_base) { |
|---|
| 268 | 259 | pr_err("%s: could not map bootram base\n", __func__); |
|---|
| 260 | + of_node_put(sram_np); |
|---|
| 269 | 261 | return -ENOMEM; |
|---|
| 270 | 262 | } |
|---|
| 271 | 263 | |
|---|
| 272 | 264 | ret = of_address_to_resource(sram_np, 0, &res); |
|---|
| 273 | 265 | if (ret) { |
|---|
| 274 | 266 | pr_err("%s: could not get bootram phy addr\n", __func__); |
|---|
| 267 | + of_node_put(sram_np); |
|---|
| 275 | 268 | return ret; |
|---|
| 276 | 269 | } |
|---|
| 277 | 270 | rk3288_bootram_phy = res.start; |
|---|