Commit 98db5e55 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux

Pull thermal updates from Zhang Rui:
 "Thermal core and intel thermal drivers:

   - convert thermal sysfs attributes to use DEVICE_ATTR_{RO|RW|WO}()
     variants (Viresh Kumar)

   - update license to SPDX format (Lina Iyer)

   - add GeminiLake support for int340x processor_thermal driver (Sumeet
     Pawnikar)

   - prevent error in reading trip hysteresis attribute for int340x
     thermal driver (Srinivas Pandruvada)"

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  thermal: int340x: processor_thermal: Add GeminiLake support
  drivers: thermal: Update license to SPDX format
  thermal: int340x: Prevent error in reading trip hysteresis attribute
  thermal: Use DEVICE_ATTR_{RO|RW|WO}() variants
  thermal: Shorten name of sysfs callbacks
parents 7259f645 e9ed3ee6
...@@ -147,8 +147,8 @@ static int int340x_thermal_get_trip_hyst(struct thermal_zone_device *zone, ...@@ -147,8 +147,8 @@ static int int340x_thermal_get_trip_hyst(struct thermal_zone_device *zone,
status = acpi_evaluate_integer(d->adev->handle, "GTSH", NULL, &hyst); status = acpi_evaluate_integer(d->adev->handle, "GTSH", NULL, &hyst);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return -EIO; *temp = 0;
else
*temp = hyst * 100; *temp = hyst * 100;
return 0; return 0;
......
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
#define PCI_DEVICE_ID_PROC_BXTX_THERMAL 0x4A8C #define PCI_DEVICE_ID_PROC_BXTX_THERMAL 0x4A8C
#define PCI_DEVICE_ID_PROC_BXTP_THERMAL 0x5A8C #define PCI_DEVICE_ID_PROC_BXTP_THERMAL 0x5A8C
/* GeminiLake thermal reporting device */
#define PCI_DEVICE_ID_PROC_GLK_THERMAL 0x318C
struct power_config { struct power_config {
u32 index; u32 index;
u32 min_uw; u32 min_uw;
...@@ -467,6 +470,7 @@ static const struct pci_device_id proc_thermal_pci_ids[] = { ...@@ -467,6 +470,7 @@ static const struct pci_device_id proc_thermal_pci_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_BXTP_THERMAL)}, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_BXTP_THERMAL)},
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_CNL_THERMAL)}, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_CNL_THERMAL)},
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_CFL_THERMAL)}, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_CFL_THERMAL)},
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_PROC_GLK_THERMAL)},
{ 0, }, { 0, },
}; };
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* of-thermal.c - Generic Thermal Management device tree support. * of-thermal.c - Generic Thermal Management device tree support.
* *
* Copyright (C) 2013 Texas Instruments * Copyright (C) 2013 Texas Instruments
* Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com> * Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
*
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
#include <linux/thermal.h> #include <linux/thermal.h>
#include <linux/slab.h> #include <linux/slab.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* thermal.c - Generic Thermal Management Sysfs support. * thermal.c - Generic Thermal Management Sysfs support.
* *
* Copyright (C) 2008 Intel Corp * Copyright (C) 2008 Intel Corp
* Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
* Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
...@@ -736,7 +733,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, ...@@ -736,7 +733,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
sysfs_attr_init(&dev->attr.attr); sysfs_attr_init(&dev->attr.attr);
dev->attr.attr.name = dev->attr_name; dev->attr.attr.name = dev->attr_name;
dev->attr.attr.mode = 0444; dev->attr.attr.mode = 0444;
dev->attr.show = thermal_cooling_device_trip_point_show; dev->attr.show = trip_point_show;
result = device_create_file(&tz->device, &dev->attr); result = device_create_file(&tz->device, &dev->attr);
if (result) if (result)
goto remove_symbol_link; goto remove_symbol_link;
...@@ -745,8 +742,8 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, ...@@ -745,8 +742,8 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
sysfs_attr_init(&dev->weight_attr.attr); sysfs_attr_init(&dev->weight_attr.attr);
dev->weight_attr.attr.name = dev->weight_attr_name; dev->weight_attr.attr.name = dev->weight_attr_name;
dev->weight_attr.attr.mode = S_IWUSR | S_IRUGO; dev->weight_attr.attr.mode = S_IWUSR | S_IRUGO;
dev->weight_attr.show = thermal_cooling_device_weight_show; dev->weight_attr.show = weight_show;
dev->weight_attr.store = thermal_cooling_device_weight_store; dev->weight_attr.store = weight_store;
result = device_create_file(&tz->device, &dev->weight_attr); result = device_create_file(&tz->device, &dev->weight_attr);
if (result) if (result)
goto remove_trip_file; goto remove_trip_file;
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* thermal_core.h * thermal_core.h
* *
* Copyright (C) 2012 Intel Corp * Copyright (C) 2012 Intel Corp
* Author: Durgadoss R <durgadoss.r@intel.com> * Author: Durgadoss R <durgadoss.r@intel.com>
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
#ifndef __THERMAL_CORE_H__ #ifndef __THERMAL_CORE_H__
...@@ -75,15 +60,10 @@ void thermal_zone_destroy_device_groups(struct thermal_zone_device *); ...@@ -75,15 +60,10 @@ void thermal_zone_destroy_device_groups(struct thermal_zone_device *);
void thermal_cooling_device_setup_sysfs(struct thermal_cooling_device *); void thermal_cooling_device_setup_sysfs(struct thermal_cooling_device *);
void thermal_cooling_device_destroy_sysfs(struct thermal_cooling_device *cdev); void thermal_cooling_device_destroy_sysfs(struct thermal_cooling_device *cdev);
/* used only at binding time */ /* used only at binding time */
ssize_t ssize_t trip_point_show(struct device *, struct device_attribute *, char *);
thermal_cooling_device_trip_point_show(struct device *, ssize_t weight_show(struct device *, struct device_attribute *, char *);
struct device_attribute *, char *); ssize_t weight_store(struct device *, struct device_attribute *, const char *,
ssize_t thermal_cooling_device_weight_show(struct device *, size_t);
struct device_attribute *, char *);
ssize_t thermal_cooling_device_weight_store(struct device *,
struct device_attribute *,
const char *, size_t);
#ifdef CONFIG_THERMAL_STATISTICS #ifdef CONFIG_THERMAL_STATISTICS
void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev, void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* thermal_helpers.c - helper functions to handle thermal devices * thermal_helpers.c - helper functions to handle thermal devices
* *
...@@ -7,10 +8,6 @@ ...@@ -7,10 +8,6 @@
* Copyright (C) 2008 Intel Corp * Copyright (C) 2008 Intel Corp
* Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
* Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* thermal_hwmon.c - Generic Thermal Management hwmon support. * thermal_hwmon.c - Generic Thermal Management hwmon support.
* *
...@@ -8,22 +9,6 @@ ...@@ -8,22 +9,6 @@
* *
* Copyright (C) 2013 Texas Instruments * Copyright (C) 2013 Texas Instruments
* Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com> * Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
#include <linux/hwmon.h> #include <linux/hwmon.h>
#include <linux/thermal.h> #include <linux/thermal.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* thermal_hwmon.h - Generic Thermal Management hwmon support. * thermal_hwmon.h - Generic Thermal Management hwmon support.
* *
...@@ -8,22 +9,6 @@ ...@@ -8,22 +9,6 @@
* *
* Copyright (C) 2013 Texas Instruments * Copyright (C) 2013 Texas Instruments
* Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com> * Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
#ifndef __THERMAL_HWMON_H__ #ifndef __THERMAL_HWMON_H__
#define __THERMAL_HWMON_H__ #define __THERMAL_HWMON_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* thermal.c - sysfs interface of thermal devices * thermal.c - sysfs interface of thermal devices
* *
...@@ -7,10 +8,6 @@ ...@@ -7,10 +8,6 @@
* Copyright (C) 2008 Intel Corp * Copyright (C) 2008 Intel Corp
* Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
* Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
...@@ -381,7 +378,7 @@ sustainable_power_store(struct device *dev, struct device_attribute *devattr, ...@@ -381,7 +378,7 @@ sustainable_power_store(struct device *dev, struct device_attribute *devattr,
\ \
return count; \ return count; \
} \ } \
static DEVICE_ATTR(name, S_IWUSR | S_IRUGO, name##_show, name##_store) static DEVICE_ATTR_RW(name)
create_s32_tzp_attr(k_po); create_s32_tzp_attr(k_po);
create_s32_tzp_attr(k_pu); create_s32_tzp_attr(k_pu);
...@@ -668,17 +665,15 @@ void thermal_zone_destroy_device_groups(struct thermal_zone_device *tz) ...@@ -668,17 +665,15 @@ void thermal_zone_destroy_device_groups(struct thermal_zone_device *tz)
/* sys I/F for cooling device */ /* sys I/F for cooling device */
static ssize_t static ssize_t
thermal_cooling_device_type_show(struct device *dev, cdev_type_show(struct device *dev, struct device_attribute *attr, char *buf)
struct device_attribute *attr, char *buf)
{ {
struct thermal_cooling_device *cdev = to_cooling_device(dev); struct thermal_cooling_device *cdev = to_cooling_device(dev);
return sprintf(buf, "%s\n", cdev->type); return sprintf(buf, "%s\n", cdev->type);
} }
static ssize_t static ssize_t max_state_show(struct device *dev, struct device_attribute *attr,
thermal_cooling_device_max_state_show(struct device *dev, char *buf)
struct device_attribute *attr, char *buf)
{ {
struct thermal_cooling_device *cdev = to_cooling_device(dev); struct thermal_cooling_device *cdev = to_cooling_device(dev);
unsigned long state; unsigned long state;
...@@ -690,9 +685,8 @@ thermal_cooling_device_max_state_show(struct device *dev, ...@@ -690,9 +685,8 @@ thermal_cooling_device_max_state_show(struct device *dev,
return sprintf(buf, "%ld\n", state); return sprintf(buf, "%ld\n", state);
} }
static ssize_t static ssize_t cur_state_show(struct device *dev, struct device_attribute *attr,
thermal_cooling_device_cur_state_show(struct device *dev, char *buf)
struct device_attribute *attr, char *buf)
{ {
struct thermal_cooling_device *cdev = to_cooling_device(dev); struct thermal_cooling_device *cdev = to_cooling_device(dev);
unsigned long state; unsigned long state;
...@@ -705,8 +699,7 @@ thermal_cooling_device_cur_state_show(struct device *dev, ...@@ -705,8 +699,7 @@ thermal_cooling_device_cur_state_show(struct device *dev,
} }
static ssize_t static ssize_t
thermal_cooling_device_cur_state_store(struct device *dev, cur_state_store(struct device *dev, struct device_attribute *attr,
struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
struct thermal_cooling_device *cdev = to_cooling_device(dev); struct thermal_cooling_device *cdev = to_cooling_device(dev);
...@@ -726,13 +719,10 @@ thermal_cooling_device_cur_state_store(struct device *dev, ...@@ -726,13 +719,10 @@ thermal_cooling_device_cur_state_store(struct device *dev,
return count; return count;
} }
static struct device_attribute dev_attr_cdev_type = static struct device_attribute
__ATTR(type, 0444, thermal_cooling_device_type_show, NULL); dev_attr_cdev_type = __ATTR(type, 0444, cdev_type_show, NULL);
static DEVICE_ATTR(max_state, 0444, static DEVICE_ATTR_RO(max_state);
thermal_cooling_device_max_state_show, NULL); static DEVICE_ATTR_RW(cur_state);
static DEVICE_ATTR(cur_state, 0644,
thermal_cooling_device_cur_state_show,
thermal_cooling_device_cur_state_store);
static struct attribute *cooling_device_attrs[] = { static struct attribute *cooling_device_attrs[] = {
&dev_attr_cdev_type.attr, &dev_attr_cdev_type.attr,
...@@ -791,10 +781,8 @@ void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev, ...@@ -791,10 +781,8 @@ void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
spin_unlock(&stats->lock); spin_unlock(&stats->lock);
} }
static ssize_t static ssize_t total_trans_show(struct device *dev,
thermal_cooling_device_total_trans_show(struct device *dev, struct device_attribute *attr, char *buf)
struct device_attribute *attr,
char *buf)
{ {
struct thermal_cooling_device *cdev = to_cooling_device(dev); struct thermal_cooling_device *cdev = to_cooling_device(dev);
struct cooling_dev_stats *stats = cdev->stats; struct cooling_dev_stats *stats = cdev->stats;
...@@ -808,8 +796,7 @@ thermal_cooling_device_total_trans_show(struct device *dev, ...@@ -808,8 +796,7 @@ thermal_cooling_device_total_trans_show(struct device *dev,
} }
static ssize_t static ssize_t
thermal_cooling_device_time_in_state_show(struct device *dev, time_in_state_ms_show(struct device *dev, struct device_attribute *attr,
struct device_attribute *attr,
char *buf) char *buf)
{ {
struct thermal_cooling_device *cdev = to_cooling_device(dev); struct thermal_cooling_device *cdev = to_cooling_device(dev);
...@@ -830,9 +817,8 @@ thermal_cooling_device_time_in_state_show(struct device *dev, ...@@ -830,9 +817,8 @@ thermal_cooling_device_time_in_state_show(struct device *dev,
} }
static ssize_t static ssize_t
thermal_cooling_device_reset_store(struct device *dev, reset_store(struct device *dev, struct device_attribute *attr, const char *buf,
struct device_attribute *attr, size_t count)
const char *buf, size_t count)
{ {
struct thermal_cooling_device *cdev = to_cooling_device(dev); struct thermal_cooling_device *cdev = to_cooling_device(dev);
struct cooling_dev_stats *stats = cdev->stats; struct cooling_dev_stats *stats = cdev->stats;
...@@ -853,10 +839,8 @@ thermal_cooling_device_reset_store(struct device *dev, ...@@ -853,10 +839,8 @@ thermal_cooling_device_reset_store(struct device *dev,
return count; return count;
} }
static ssize_t static ssize_t trans_table_show(struct device *dev,
thermal_cooling_device_trans_table_show(struct device *dev, struct device_attribute *attr, char *buf)
struct device_attribute *attr,
char *buf)
{ {
struct thermal_cooling_device *cdev = to_cooling_device(dev); struct thermal_cooling_device *cdev = to_cooling_device(dev);
struct cooling_dev_stats *stats = cdev->stats; struct cooling_dev_stats *stats = cdev->stats;
...@@ -899,13 +883,10 @@ thermal_cooling_device_trans_table_show(struct device *dev, ...@@ -899,13 +883,10 @@ thermal_cooling_device_trans_table_show(struct device *dev,
return len; return len;
} }
static DEVICE_ATTR(total_trans, 0444, thermal_cooling_device_total_trans_show, static DEVICE_ATTR_RO(total_trans);
NULL); static DEVICE_ATTR_RO(time_in_state_ms);
static DEVICE_ATTR(time_in_state_ms, 0444, static DEVICE_ATTR_WO(reset);
thermal_cooling_device_time_in_state_show, NULL); static DEVICE_ATTR_RO(trans_table);
static DEVICE_ATTR(reset, 0200, NULL, thermal_cooling_device_reset_store);
static DEVICE_ATTR(trans_table, 0444,
thermal_cooling_device_trans_table_show, NULL);
static struct attribute *cooling_device_stats_attrs[] = { static struct attribute *cooling_device_stats_attrs[] = {
&dev_attr_total_trans.attr, &dev_attr_total_trans.attr,
...@@ -980,8 +961,7 @@ void thermal_cooling_device_destroy_sysfs(struct thermal_cooling_device *cdev) ...@@ -980,8 +961,7 @@ void thermal_cooling_device_destroy_sysfs(struct thermal_cooling_device *cdev)
/* these helper will be used only at the time of bindig */ /* these helper will be used only at the time of bindig */
ssize_t ssize_t
thermal_cooling_device_trip_point_show(struct device *dev, trip_point_show(struct device *dev, struct device_attribute *attr, char *buf)
struct device_attribute *attr, char *buf)
{ {
struct thermal_instance *instance; struct thermal_instance *instance;
...@@ -995,8 +975,7 @@ thermal_cooling_device_trip_point_show(struct device *dev, ...@@ -995,8 +975,7 @@ thermal_cooling_device_trip_point_show(struct device *dev,
} }
ssize_t ssize_t
thermal_cooling_device_weight_show(struct device *dev, weight_show(struct device *dev, struct device_attribute *attr, char *buf)
struct device_attribute *attr, char *buf)
{ {
struct thermal_instance *instance; struct thermal_instance *instance;
...@@ -1005,9 +984,7 @@ thermal_cooling_device_weight_show(struct device *dev, ...@@ -1005,9 +984,7 @@ thermal_cooling_device_weight_show(struct device *dev,
return sprintf(buf, "%d\n", instance->weight); return sprintf(buf, "%d\n", instance->weight);
} }
ssize_t ssize_t weight_store(struct device *dev, struct device_attribute *attr,
thermal_cooling_device_weight_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
struct thermal_instance *instance; struct thermal_instance *instance;
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* thermal.h ($Revision: 0 $) * thermal.h ($Revision: 0 $)
* *
* Copyright (C) 2008 Intel Corp * Copyright (C) 2008 Intel Corp
* Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
* Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
#ifndef __THERMAL_H__ #ifndef __THERMAL_H__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment