Lines Matching defs:cdev
654 struct thermal_cooling_device *cdev = to_cooling_device(dev);
656 return sprintf(buf, "%s\n", cdev->type);
662 struct thermal_cooling_device *cdev = to_cooling_device(dev);
666 ret = cdev->ops->get_max_state(cdev, &state);
675 struct thermal_cooling_device *cdev = to_cooling_device(dev);
679 ret = cdev->ops->get_cur_state(cdev, &state);
689 struct thermal_cooling_device *cdev = to_cooling_device(dev);
699 mutex_lock(&cdev->lock);
701 result = cdev->ops->set_cur_state(cdev, state);
703 thermal_cooling_device_stats_update(cdev, state);
705 mutex_unlock(&cdev->lock);
752 void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
755 struct cooling_dev_stats *stats = cdev->stats;
777 struct thermal_cooling_device *cdev = to_cooling_device(dev);
778 struct cooling_dev_stats *stats = cdev->stats;
792 struct thermal_cooling_device *cdev = to_cooling_device(dev);
793 struct cooling_dev_stats *stats = cdev->stats;
813 struct thermal_cooling_device *cdev = to_cooling_device(dev);
814 struct cooling_dev_stats *stats = cdev->stats;
835 struct thermal_cooling_device *cdev = to_cooling_device(dev);
836 struct cooling_dev_stats *stats = cdev->stats;
894 static void cooling_device_stats_setup(struct thermal_cooling_device *cdev)
901 if (cdev->ops->get_max_state(cdev, &states))
916 cdev->stats = stats;
930 static void cooling_device_stats_destroy(struct thermal_cooling_device *cdev)
932 kfree(cdev->stats);
933 cdev->stats = NULL;
939 cooling_device_stats_setup(struct thermal_cooling_device *cdev) {}
941 cooling_device_stats_destroy(struct thermal_cooling_device *cdev) {}
945 void thermal_cooling_device_setup_sysfs(struct thermal_cooling_device *cdev)
947 cooling_device_stats_setup(cdev);
948 cdev->device.groups = cooling_device_attr_groups;
951 void thermal_cooling_device_destroy_sysfs(struct thermal_cooling_device *cdev)
953 cooling_device_stats_destroy(cdev);