| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * PowerNV OPAL Sensor-groups interface |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2017 IBM Corp. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * as published by the Free Software Foundation; either version |
|---|
| 9 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | |
|---|
| 12 | 8 | #define pr_fmt(fmt) "opal-sensor-groups: " fmt |
|---|
| .. | .. |
|---|
| 17 | 13 | |
|---|
| 18 | 14 | #include <asm/opal.h> |
|---|
| 19 | 15 | |
|---|
| 20 | | -DEFINE_MUTEX(sg_mutex); |
|---|
| 16 | +static DEFINE_MUTEX(sg_mutex); |
|---|
| 21 | 17 | |
|---|
| 22 | 18 | static struct kobject *sg_kobj; |
|---|
| 23 | 19 | |
|---|
| .. | .. |
|---|
| 214 | 210 | } |
|---|
| 215 | 211 | |
|---|
| 216 | 212 | if (!of_property_read_u32(node, "ibm,chip-id", &chipid)) |
|---|
| 217 | | - sprintf(sgs[i].name, "%s%d", node->name, chipid); |
|---|
| 213 | + sprintf(sgs[i].name, "%pOFn%d", node, chipid); |
|---|
| 218 | 214 | else |
|---|
| 219 | | - sprintf(sgs[i].name, "%s", node->name); |
|---|
| 215 | + sprintf(sgs[i].name, "%pOFn", node); |
|---|
| 220 | 216 | |
|---|
| 221 | 217 | sgs[i].sg.name = sgs[i].name; |
|---|
| 222 | 218 | if (add_attr_group(ops, len, &sgs[i], sgid)) { |
|---|