hwmon.c (cbecf716ca618fd44feda6bd9a64a8179d031fc5) | hwmon.c (77d76768d0984510b2be1987a3c410df598a9ea2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring 4 * 5 * This file defines the sysfs class "hwmon", for use by sensors drivers. 6 * 7 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com> 8 */ --- 65 unchanged lines hidden (view full) --- 74static struct attribute *hwmon_dev_attrs[] = { 75 &dev_attr_name.attr, 76 NULL 77}; 78 79static umode_t hwmon_dev_name_is_visible(struct kobject *kobj, 80 struct attribute *attr, int n) 81{ | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring 4 * 5 * This file defines the sysfs class "hwmon", for use by sensors drivers. 6 * 7 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com> 8 */ --- 65 unchanged lines hidden (view full) --- 74static struct attribute *hwmon_dev_attrs[] = { 75 &dev_attr_name.attr, 76 NULL 77}; 78 79static umode_t hwmon_dev_name_is_visible(struct kobject *kobj, 80 struct attribute *attr, int n) 81{ |
82 struct device *dev = container_of(kobj, struct device, kobj); | 82 struct device *dev = kobj_to_dev(kobj); |
83 84 if (to_hwmon_device(dev)->name == NULL) 85 return 0; 86 87 return attr->mode; 88} 89 90static const struct attribute_group hwmon_dev_attr_group = { --- 951 unchanged lines hidden --- | 83 84 if (to_hwmon_device(dev)->name == NULL) 85 return 0; 86 87 return attr->mode; 88} 89 90static const struct attribute_group hwmon_dev_attr_group = { --- 951 unchanged lines hidden --- |