Lines Matching refs:hwdev

115 	struct hwmon_device *hwdev = to_hwmon_device(dev);
117 if (hwdev->group.attrs)
118 hwmon_free_attrs(hwdev->group.attrs);
119 kfree(hwdev->groups);
120 kfree(hwdev);
142 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);
146 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input,
167 struct hwmon_device *hwdev = to_hwmon_device(dev);
195 list_add(&tdata->node, &hwdev->tzdata);
202 struct hwmon_device *hwdev = to_hwmon_device(dev);
203 const struct hwmon_chip_info *chip = hwdev->chip;
233 struct hwmon_device *hwdev = to_hwmon_device(dev);
236 list_for_each_entry(tzdata, &hwdev->tzdata, node) {
701 struct hwmon_device *hwdev;
716 hwdev = kzalloc(sizeof(*hwdev), GFP_KERNEL);
717 if (hwdev == NULL) {
722 hdev = &hwdev->dev;
726 int ngroups = 2; /* terminating NULL plus &hwdev->groups */
732 hwdev->groups = kcalloc(ngroups, sizeof(*groups), GFP_KERNEL);
733 if (!hwdev->groups) {
744 hwdev->group.attrs = attrs;
746 hwdev->groups[ngroups++] = &hwdev->group;
750 hwdev->groups[ngroups++] = groups[i];
753 hdev->groups = hwdev->groups;
758 hwdev->name = name;
764 hwdev->chip = chip;
773 INIT_LIST_HEAD(&hwdev->tzdata);
782 * Don't worry about hwdev; hwmon_dev_release(), called
892 struct device *hwdev = *(struct device **)res;
894 hwmon_device_unregister(hwdev);
912 struct device **ptr, *hwdev;
921 hwdev = hwmon_device_register_with_groups(dev, name, drvdata, groups);
922 if (IS_ERR(hwdev))
925 *ptr = hwdev;
927 return hwdev;
931 return hwdev;
952 struct device **ptr, *hwdev;
961 hwdev = hwmon_device_register_with_info(dev, name, drvdata, chip,
963 if (IS_ERR(hwdev))
966 *ptr = hwdev;
969 return hwdev;
973 return hwdev;
979 struct device **hwdev = res;
981 return *hwdev == data;