[lkml]   [2012]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] thermal: fix build error at thermal_sys.c
    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


    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] =
    tz->trip_type_attrs[indx].attr.attr.mode = S_IRUGO;

     \ /
      Last update: 2012-07-22 11:01    [W:0.028 / U:92.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site