| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2015, Sony Mobile Communications Inc. |
|---|
| 3 | 4 | * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 and |
|---|
| 7 | | - * only version 2 as published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | 5 | */ |
|---|
| 14 | 6 | #include <linux/device.h> |
|---|
| 15 | 7 | #include <linux/list.h> |
|---|
| .. | .. |
|---|
| 144 | 136 | struct qcom_smem_state *state = container_of(ref, struct qcom_smem_state, refcount); |
|---|
| 145 | 137 | |
|---|
| 146 | 138 | list_del(&state->list); |
|---|
| 139 | + of_node_put(state->of_node); |
|---|
| 147 | 140 | kfree(state); |
|---|
| 148 | 141 | } |
|---|
| 149 | 142 | |
|---|
| .. | .. |
|---|
| 177 | 170 | |
|---|
| 178 | 171 | kref_init(&state->refcount); |
|---|
| 179 | 172 | |
|---|
| 180 | | - state->of_node = of_node; |
|---|
| 173 | + state->of_node = of_node_get(of_node); |
|---|
| 181 | 174 | state->ops = *ops; |
|---|
| 182 | 175 | state->priv = priv; |
|---|
| 183 | 176 | |
|---|