| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Dove thermal sensor driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2013 Andrew Lunn <andrew@lunn.ch> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This software is licensed under the terms of the GNU General Public |
|---|
| 7 | | - * License version 2, as published by the Free Software Foundation, and |
|---|
| 8 | | - * may be copied, distributed, and modified under those terms. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | 6 | */ |
|---|
| 16 | 7 | #include <linux/device.h> |
|---|
| 17 | 8 | #include <linux/err.h> |
|---|
| .. | .. |
|---|
| 162 | 153 | return PTR_ERR(thermal); |
|---|
| 163 | 154 | } |
|---|
| 164 | 155 | |
|---|
| 156 | + ret = thermal_zone_device_enable(thermal); |
|---|
| 157 | + if (ret) { |
|---|
| 158 | + thermal_zone_device_unregister(thermal); |
|---|
| 159 | + return ret; |
|---|
| 160 | + } |
|---|
| 161 | + |
|---|
| 165 | 162 | platform_set_drvdata(pdev, thermal); |
|---|
| 166 | 163 | |
|---|
| 167 | 164 | return 0; |
|---|