]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/thermal/thermal.c
IPoIB: Use checksum offload support if available
[linux-2.6-omap-h63xx.git] / drivers / thermal / thermal.c
index 5f1d318f0574e378a2f846339d1b638bd447a726..7f79bbf652d7483c1a11f1b793973f0eddf345f4 100644 (file)
@@ -196,6 +196,10 @@ static struct device_attribute trip_point_attrs[] = {
        __ATTR(trip_point_8_temp, 0444, trip_point_temp_show, NULL),
        __ATTR(trip_point_9_type, 0444, trip_point_type_show, NULL),
        __ATTR(trip_point_9_temp, 0444, trip_point_temp_show, NULL),
+       __ATTR(trip_point_10_type, 0444, trip_point_type_show, NULL),
+       __ATTR(trip_point_10_temp, 0444, trip_point_temp_show, NULL),
+       __ATTR(trip_point_11_type, 0444, trip_point_type_show, NULL),
+       __ATTR(trip_point_11_temp, 0444, trip_point_temp_show, NULL),
 };
 
 #define TRIP_POINT_ATTR_ADD(_dev, _index, result)     \
@@ -448,20 +452,20 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
        int result;
 
        if (strlen(type) >= THERMAL_NAME_LENGTH)
-               return NULL;
+               return ERR_PTR(-EINVAL);
 
        if (!ops || !ops->get_max_state || !ops->get_cur_state ||
            !ops->set_cur_state)
-               return NULL;
+               return ERR_PTR(-EINVAL);
 
        cdev = kzalloc(sizeof(struct thermal_cooling_device), GFP_KERNEL);
        if (!cdev)
-               return NULL;
+               return ERR_PTR(-ENOMEM);
 
        result = get_idr(&thermal_cdev_idr, &thermal_idr_lock, &cdev->id);
        if (result) {
                kfree(cdev);
-               return NULL;
+               return ERR_PTR(result);
        }
 
        strcpy(cdev->type, type);
@@ -473,7 +477,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
        if (result) {
                release_idr(&thermal_cdev_idr, &thermal_idr_lock, cdev->id);
                kfree(cdev);
-               return NULL;
+               return ERR_PTR(result);
        }
 
        /* sys I/F */
@@ -509,7 +513,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
       unregister:
        release_idr(&thermal_cdev_idr, &thermal_idr_lock, cdev->id);
        device_unregister(&cdev->device);
-       return NULL;
+       return ERR_PTR(result);
 }
 
 EXPORT_SYMBOL(thermal_cooling_device_register);
@@ -581,17 +585,17 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
        int count;
 
        if (strlen(type) >= THERMAL_NAME_LENGTH)
-               return NULL;
+               return ERR_PTR(-EINVAL);
 
        if (trips > THERMAL_MAX_TRIPS || trips < 0)
-               return NULL;
+               return ERR_PTR(-EINVAL);
 
        if (!ops || !ops->get_temp)
-               return NULL;
+               return ERR_PTR(-EINVAL);
 
        tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL);
        if (!tz)
-               return NULL;
+               return ERR_PTR(-ENOMEM);
 
        INIT_LIST_HEAD(&tz->cooling_devices);
        idr_init(&tz->idr);
@@ -599,7 +603,7 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
        result = get_idr(&thermal_tz_idr, &thermal_idr_lock, &tz->id);
        if (result) {
                kfree(tz);
-               return NULL;
+               return ERR_PTR(result);
        }
 
        strcpy(tz->type, type);
@@ -612,7 +616,7 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
        if (result) {
                release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);
                kfree(tz);
-               return NULL;
+               return ERR_PTR(result);
        }
 
        /* sys I/F */
@@ -654,7 +658,7 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
       unregister:
        release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);
        device_unregister(&tz->device);
-       return NULL;
+       return ERR_PTR(result);
 }
 
 EXPORT_SYMBOL(thermal_zone_device_register);