Merge branch 'acpi-thermal'
[linux-2.6-microblaze.git] / drivers / thermal / thermal_core.c
index 8ee22eb..2b345f2 100644 (file)
@@ -662,7 +662,8 @@ int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
        if (result)
                goto release_ida;
 
-       sprintf(dev->attr_name, "cdev%d_trip_point", dev->id);
+       snprintf(dev->attr_name, sizeof(dev->attr_name), "cdev%d_trip_point",
+                dev->id);
        sysfs_attr_init(&dev->attr.attr);
        dev->attr.attr.name = dev->attr_name;
        dev->attr.attr.mode = 0444;
@@ -671,7 +672,8 @@ int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
        if (result)
                goto remove_symbol_link;
 
-       sprintf(dev->weight_attr_name, "cdev%d_weight", dev->id);
+       snprintf(dev->weight_attr_name, sizeof(dev->weight_attr_name),
+                "cdev%d_weight", dev->id);
        sysfs_attr_init(&dev->weight_attr.attr);
        dev->weight_attr.attr.name = dev->weight_attr_name;
        dev->weight_attr.attr.mode = S_IWUSR | S_IRUGO;