summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-10-25 15:41:10 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-10-25 15:41:10 +0300
commit607218deac6e29c52f4ce521ed467a0d75090a0d (patch)
tree9808c3dbbe6a9f0a5ce47ad8d336ca38eb9ac2ca /tools
parent8aa49284f3673879dcabfb116f7cac265b4cb0f5 (diff)
parent9618efe343ead954ca5c23856ae23d0a29e7d4b9 (diff)
downloadlinux-607218deac6e29c52f4ce521ed467a0d75090a0d.tar.xz
Merge tag 'thermal-v6.7-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux
Merge thermal control (ARM drivers mostly) updates for 6.7-rc1 from Daniel Lezcano: "- Add support for Mediatek LVTS MT8192 driver along with the suspend/resume routines (Balsam Chihi) - Fix probe for THERMAL_V2 for the Mediatek LVTS driver (Markus Schneider-Pargmann) - Remove duplicate error message in the max76620 driver when thermal_of_zone_register() fails as the sub routine already show one (Thierry Reding) - Add i.MX7D compatible bindings to fix a warning from dtbs_check for the imx6ul platform (Alexander Stein) - Add sa8775p compatible for the QCom tsens driver (Priyansh Jain) - Fix error check in lvts_debugfs_init() which is checking against NULL instead of PTR_ERR() on the LVTS Mediatek driver (Minjie Du) - Remove unused variable in the thermal/tools (Kuan-Wei Chiu) - Document the imx8dl thermal sensor (Fabio Estevam) - Add variable names in callback prototypes to prevent warning from checkpatch.pl for the imx8mm driver (Bragatheswaran Manickavel) - Add missing unevaluatedProperties on child node schemas for tegra124 (Rob Herring) - Add mt7988 support for the Mediatek LVTS driver (Frank Wunderlich)" * tag 'thermal-v6.7-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal/qcom/tsens: Drop ops_v0_1 thermal/drivers/mediatek/lvts_thermal: Update calibration data documentation thermal/drivers/mediatek/lvts_thermal: Add mt8192 support thermal/drivers/mediatek/lvts_thermal: Add suspend and resume dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for mt8192 thermal/drivers/mediatek: Fix probe for THERMAL_V2 thermal/drivers/max77620: Remove duplicate error message dt-bindings: timer: add imx7d compatible dt-bindings: net: microchip: Allow nvmem-cell usage dt-bindings: imx-thermal: Add #thermal-sensor-cells property dt-bindings: thermal: tsens: Add sa8775p compatible thermal/drivers/mediatek/lvts_thermal: Fix error check in lvts_debugfs_init() tools/thermal: Remove unused 'mds' and 'nrhandler' variables dt-bindings: thermal: fsl,scu-thermal: Document imx8dl thermal/drivers/imx8mm_thermal: Fix function pointer declaration by adding identifier name dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas thermal/drivers/mediatek/lvts_thermal: Add mt7988 support thermal/drivers/mediatek/lvts_thermal: Make coeff configurable dt-bindings: thermal: mediatek: Add LVTS thermal sensors for mt7988 dt-bindings: thermal: mediatek: Add mt7988 lvts compatible
Diffstat (limited to 'tools')
-rw-r--r--tools/thermal/lib/mainloop.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/tools/thermal/lib/mainloop.c b/tools/thermal/lib/mainloop.c
index 94cbbcbd1c14..bf4c1b730d7b 100644
--- a/tools/thermal/lib/mainloop.c
+++ b/tools/thermal/lib/mainloop.c
@@ -9,7 +9,6 @@
#include "log.h"
static int epfd = -1;
-static unsigned short nrhandler;
static sig_atomic_t exit_mainloop;
struct mainloop_data {
@@ -18,8 +17,6 @@ struct mainloop_data {
int fd;
};
-static struct mainloop_data **mds;
-
#define MAX_EVENTS 10
int mainloop(unsigned int timeout)
@@ -61,13 +58,6 @@ int mainloop_add(int fd, mainloop_callback_t cb, void *data)
struct mainloop_data *md;
- if (fd >= nrhandler) {
- mds = realloc(mds, sizeof(*mds) * (fd + 1));
- if (!mds)
- return -1;
- nrhandler = fd + 1;
- }
-
md = malloc(sizeof(*md));
if (!md)
return -1;
@@ -76,7 +66,6 @@ int mainloop_add(int fd, mainloop_callback_t cb, void *data)
md->cb = cb;
md->fd = fd;
- mds[fd] = md;
ev.data.ptr = md;
if (epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev) < 0) {
@@ -89,14 +78,9 @@ int mainloop_add(int fd, mainloop_callback_t cb, void *data)
int mainloop_del(int fd)
{
- if (fd >= nrhandler)
- return -1;
-
if (epoll_ctl(epfd, EPOLL_CTL_DEL, fd, NULL) < 0)
return -1;
- free(mds[fd]);
-
return 0;
}