Lines Matching refs:hwdev

130 	struct hwmon_device *hwdev = to_hwmon_device(dev);
132 if (hwdev->group.attrs)
133 hwmon_free_attrs(hwdev->group.attrs);
134 kfree(hwdev->groups);
135 kfree(hwdev->label);
136 kfree(hwdev);
157 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);
161 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input,
174 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);
175 const struct hwmon_chip_info *chip = hwdev->chip;
218 struct hwmon_device *hwdev = to_hwmon_device(dev);
246 list_add(&tdata->node, &hwdev->tzdata);
253 struct hwmon_device *hwdev = to_hwmon_device(dev);
254 const struct hwmon_chip_info *chip = hwdev->chip;
284 struct hwmon_device *hwdev = to_hwmon_device(dev);
287 list_for_each_entry(tzdata, &hwdev->tzdata, node) {
761 struct hwmon_device *hwdev;
777 hwdev = kzalloc(sizeof(*hwdev), GFP_KERNEL);
778 if (hwdev == NULL) {
783 hdev = &hwdev->dev;
787 int ngroups = 2; /* terminating NULL plus &hwdev->groups */
793 hwdev->groups = kcalloc(ngroups, sizeof(*groups), GFP_KERNEL);
794 if (!hwdev->groups) {
805 hwdev->group.attrs = attrs;
807 hwdev->groups[ngroups++] = &hwdev->group;
811 hwdev->groups[ngroups++] = groups[i];
814 hdev->groups = hwdev->groups;
824 hwdev->label = kstrdup(label, GFP_KERNEL);
825 if (hwdev->label == NULL) {
831 hwdev->name = name;
837 hwdev->chip = chip;
846 INIT_LIST_HEAD(&hwdev->tzdata);
855 * Don't worry about hwdev; hwmon_dev_release(), called
988 struct device *hwdev = *(struct device **)res;
990 hwmon_device_unregister(hwdev);
1008 struct device **ptr, *hwdev;
1017 hwdev = hwmon_device_register_with_groups(dev, name, drvdata, groups);
1018 if (IS_ERR(hwdev))
1021 *ptr = hwdev;
1023 return hwdev;
1027 return hwdev;
1048 struct device **ptr, *hwdev;
1057 hwdev = hwmon_device_register_with_info(dev, name, drvdata, chip,
1059 if (IS_ERR(hwdev))
1062 *ptr = hwdev;
1065 return hwdev;
1069 return hwdev;
1075 struct device **hwdev = res;
1077 return *hwdev == data;