.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | | - * intel_mid_thermal.c - Intel MID platform thermal driver |
---|
| 3 | + * Intel MID platform thermal driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2011 Intel Corporation |
---|
5 | 6 | * |
---|
6 | | - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License as published by |
---|
10 | | - * the Free Software Foundation; version 2 of the License. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, but |
---|
13 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
15 | | - * General Public License for more details. |
---|
16 | | - * |
---|
17 | | - * You should have received a copy of the GNU General Public License along |
---|
18 | | - * with this program; if not, write to the Free Software Foundation, Inc., |
---|
19 | | - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
---|
20 | | - * |
---|
21 | | - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
22 | 7 | * Author: Durgadoss R <durgadoss.r@intel.com> |
---|
23 | 8 | */ |
---|
24 | 9 | |
---|
25 | 10 | #define pr_fmt(fmt) "intel_mid_thermal: " fmt |
---|
26 | 11 | |
---|
27 | | -#include <linux/module.h> |
---|
28 | | -#include <linux/init.h> |
---|
29 | | -#include <linux/err.h> |
---|
30 | | -#include <linux/param.h> |
---|
31 | 12 | #include <linux/device.h> |
---|
32 | | -#include <linux/platform_device.h> |
---|
33 | | -#include <linux/slab.h> |
---|
34 | | -#include <linux/pm.h> |
---|
35 | | -#include <linux/thermal.h> |
---|
| 13 | +#include <linux/err.h> |
---|
36 | 14 | #include <linux/mfd/intel_msic.h> |
---|
| 15 | +#include <linux/module.h> |
---|
| 16 | +#include <linux/param.h> |
---|
| 17 | +#include <linux/platform_device.h> |
---|
| 18 | +#include <linux/pm.h> |
---|
| 19 | +#include <linux/slab.h> |
---|
| 20 | +#include <linux/thermal.h> |
---|
37 | 21 | |
---|
38 | 22 | /* Number of thermal sensors */ |
---|
39 | 23 | #define MSIC_THERMAL_SENSORS 4 |
---|
.. | .. |
---|
509 | 493 | ret = PTR_ERR(pinfo->tzd[i]); |
---|
510 | 494 | goto err; |
---|
511 | 495 | } |
---|
| 496 | + ret = thermal_zone_device_enable(pinfo->tzd[i]); |
---|
| 497 | + if (ret) { |
---|
| 498 | + kfree(td_info); |
---|
| 499 | + thermal_zone_device_unregister(pinfo->tzd[i]); |
---|
| 500 | + goto err; |
---|
| 501 | + } |
---|
512 | 502 | } |
---|
513 | 503 | |
---|
514 | 504 | pinfo->pdev = pdev; |
---|
.. | .. |
---|
567 | 557 | |
---|
568 | 558 | MODULE_AUTHOR("Durgadoss R <durgadoss.r@intel.com>"); |
---|
569 | 559 | MODULE_DESCRIPTION("Intel Medfield Platform Thermal Driver"); |
---|
570 | | -MODULE_LICENSE("GPL"); |
---|
| 560 | +MODULE_LICENSE("GPL v2"); |
---|