hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/thermal/dove_thermal.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Dove thermal sensor driver
34 *
45 * 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
- *
156 */
167 #include <linux/device.h>
178 #include <linux/err.h>
....@@ -162,6 +153,12 @@
162153 return PTR_ERR(thermal);
163154 }
164155
156
+ ret = thermal_zone_device_enable(thermal);
157
+ if (ret) {
158
+ thermal_zone_device_unregister(thermal);
159
+ return ret;
160
+ }
161
+
165162 platform_set_drvdata(pdev, thermal);
166163
167164 return 0;