Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7de8e1e4 authored by Jean-Francois Dagenais's avatar Jean-Francois Dagenais Committed by Mark Salyzyn
Browse files

UPSTREAM: GKI: thermal: make device_register's type argument const



...because it can be, the buffer is strlcpy'd into a local buffer in a
thermal struct member.

Signed-off-by: default avatarJean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
(cherry picked from commit f991de53a8abef21fae3e31967cb4f6a75c070b5)
Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
Bug: 153738240
Change-Id: I3c9f18f4459890cc2ebcbf9bc6f9e6e3da339dfb
parent 47862b56
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -974,7 +974,7 @@ static void bind_cdev(struct thermal_cooling_device *cdev)
 */
static struct thermal_cooling_device *
__thermal_cooling_device_register(struct device_node *np,
				  char *type, void *devdata,
				  const char *type, void *devdata,
				  const struct thermal_cooling_device_ops *ops)
{
	struct thermal_cooling_device *cdev;
@@ -1048,7 +1048,7 @@ __thermal_cooling_device_register(struct device_node *np,
 * ERR_PTR. Caller must check return value with IS_ERR*() helpers.
 */
struct thermal_cooling_device *
thermal_cooling_device_register(char *type, void *devdata,
thermal_cooling_device_register(const char *type, void *devdata,
				const struct thermal_cooling_device_ops *ops)
{
	return __thermal_cooling_device_register(NULL, type, devdata, ops);
@@ -1072,7 +1072,7 @@ EXPORT_SYMBOL_GPL(thermal_cooling_device_register);
 */
struct thermal_cooling_device *
thermal_of_cooling_device_register(struct device_node *np,
				   char *type, void *devdata,
				   const char *type, void *devdata,
				   const struct thermal_cooling_device_ops *ops)
{
	return __thermal_cooling_device_register(np, type, devdata, ops);
+3 −3
Original line number Diff line number Diff line
@@ -520,10 +520,10 @@ void thermal_zone_device_update_temp(struct thermal_zone_device *tz,
				enum thermal_notify_event event, int temp);
void thermal_zone_set_trips(struct thermal_zone_device *);

struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
		const struct thermal_cooling_device_ops *);
struct thermal_cooling_device *thermal_cooling_device_register(const char *,
		void *, const struct thermal_cooling_device_ops *);
struct thermal_cooling_device *
thermal_of_cooling_device_register(struct device_node *np, char *, void *,
thermal_of_cooling_device_register(struct device_node *np, const char *, void *,
				   const struct thermal_cooling_device_ops *);
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name);