public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: fix build error at thermal_sys.c
@ 2012-07-22  8:10 Devendra Naga
  2012-07-22 10:58 ` Jean Delvare
  0 siblings, 1 reply; 7+ messages in thread
From: Devendra Naga @ 2012-07-22  8:10 UTC (permalink / raw)
  To: Zhang Rui, Len Brown, Andrew Morton, Jean Delvare, Joe Perches,
	linux-kernel
  Cc: Fengguang Wu, Devendra Naga, Durgadoss R

with the commit 67ff19 (Thermal: Make Thermal trip points writeable)
build error is introduced,

the following was reported from Fengguang Wu,

drivers/thermal/thermal_sys.c: In function 'create_trip_attrs':
drivers/thermal/thermal_sys.c:1216:3: error: 'count' undeclared (first use in this function)
drivers/thermal/thermal_sys.c:1216:3: note: each undeclared identifier is reported only once for each function it appears in

link:
http://www.spinics.net/lists/linux-kernel-janitors/msg12174.html

use the indx instead.

Cc: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
---

This patch is build-tested only.

 drivers/thermal/thermal_sys.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 9f56250..1b4aa9d 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1259,7 +1259,7 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int flag)
 		snprintf(tz->trip_type_attrs[indx].name, THERMAL_NAME_LENGTH,
 			 "trip_point_%d_type", indx);
 
-		sysfs_attr_init(&tz->trip_type_attrs[count].attr.attr);
+		sysfs_attr_init(&tz->trip_type_attrs[indx].attr.attr);
 		tz->trip_type_attrs[indx].attr.attr.name =
 						tz->trip_type_attrs[indx].name;
 		tz->trip_type_attrs[indx].attr.attr.mode = S_IRUGO;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-07-23  7:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-22  8:10 [PATCH] thermal: fix build error at thermal_sys.c Devendra Naga
2012-07-22 10:58 ` Jean Delvare
2012-07-23  2:02   ` Zhang Rui
2012-07-23  6:54     ` Jean Delvare
2012-07-23  7:28       ` Zhang Rui
2012-07-23  7:47         ` Jean Delvare
2012-07-23  3:08   ` R, Durgadoss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox