From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751399Ab2GVIKg (ORCPT ); Sun, 22 Jul 2012 04:10:36 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:52540 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791Ab2GVIKb (ORCPT ); Sun, 22 Jul 2012 04:10:31 -0400 From: Devendra Naga To: Zhang Rui , Len Brown , Andrew Morton , Jean Delvare , Joe Perches , linux-kernel@vger.kernel.org Cc: Fengguang Wu , Devendra Naga , Durgadoss R Subject: [PATCH] thermal: fix build error at thermal_sys.c Date: Sun, 22 Jul 2012 13:55:22 +0545 Message-Id: <1342944622-16263-1-git-send-email-develkernel412222@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Devendra Naga --- 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