Skip to content

Commit 06cf261

Browse files
committed
tifm: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the tifm bus code to use the correct field. Cc: Alex Dubov <oakad@yahoo.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3736dab commit 06cf261

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎drivers/misc/tifm_core.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,17 @@ static ssize_t type_show(struct device *dev, struct device_attribute *attr,
145145
struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev);
146146
return sprintf(buf, "%x", sock->type);
147147
}
148+
static DEVICE_ATTR_RO(type);
148149

149-
static struct device_attribute tifm_dev_attrs[] = {
150-
__ATTR(type, S_IRUGO, type_show, NULL),
151-
__ATTR_NULL
150+
static struct attribute *tifm_dev_attrs[] = {
151+
&dev_attr_type.attr,
152+
NULL,
152153
};
154+
ATTRIBUTE_GROUPS(tifm_dev);
153155

154156
static struct bus_type tifm_bus_type = {
155157
.name = "tifm",
156-
.dev_attrs = tifm_dev_attrs,
158+
.dev_groups = tifm_dev_groups,
157159
.match = tifm_bus_match,
158160
.uevent = tifm_uevent,
159161
.probe = tifm_device_probe,

0 commit comments

Comments
 (0)