From 244b2c5ca8b14627e4a17755e5922221e121c771 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 09 Oct 2024 06:15:07 +0000
Subject: [PATCH] change system file

---
 kernel/drivers/macintosh/windfarm_lm87_sensor.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/kernel/drivers/macintosh/windfarm_lm87_sensor.c b/kernel/drivers/macintosh/windfarm_lm87_sensor.c
index 8b57a1f..9fab0b4 100644
--- a/kernel/drivers/macintosh/windfarm_lm87_sensor.c
+++ b/kernel/drivers/macintosh/windfarm_lm87_sensor.c
@@ -1,10 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * Windfarm PowerMac thermal control. LM87 sensor
  *
  * Copyright 2012 Benjamin Herrenschmidt, IBM Corp.
- *
- * Released under the term of the GNU GPL v2.
- *
  */
 
 #include <linux/types.h>
@@ -110,8 +108,8 @@
 	 * the Xserve G5 has several lm87's. However, for now we only
 	 * care about the internal temperature sensor
 	 */
-	while ((np = of_get_next_child(client->dev.of_node, np)) != NULL) {
-		if (strcmp(np->name, "int-temp"))
+	for_each_child_of_node(client->dev.of_node, np) {
+		if (!of_node_name_eq(np, "int-temp"))
 			continue;
 		loc = of_get_property(np, "location", NULL);
 		if (!loc)
@@ -126,8 +124,8 @@
 		}
 	}
 	if (!name) {
-		pr_warning("wf_lm87: Unsupported sensor %pOF\n",
-			   client->dev.of_node);
+		pr_warn("wf_lm87: Unsupported sensor %pOF\n",
+			client->dev.of_node);
 		return -ENODEV;
 	}
 
@@ -150,8 +148,6 @@
 static int wf_lm87_remove(struct i2c_client *client)
 {
 	struct wf_lm87_sensor *lm = i2c_get_clientdata(client);
-
-	DBG("wf_lm87: i2c detatch called for %s\n", lm->sens.name);
 
 	/* Mark client detached */
 	lm->i2c = NULL;

--
Gitblit v1.6.2