diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mic/host/mic_main.c | 3 | ||||
-rw-r--r-- | drivers/misc/tifm_core.c | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/misc/mic/host/mic_main.c b/drivers/misc/mic/host/mic_main.c index b3520859abd3..ad838c7651c4 100644 --- a/drivers/misc/mic/host/mic_main.c +++ b/drivers/misc/mic/host/mic_main.c @@ -374,8 +374,7 @@ static int mic_probe(struct pci_dev *pdev, "device_create_with_groups failed rc %d\n", rc); goto smpt_uninit; } - mdev->state_sysfs = sysfs_get_dirent(mdev->sdev->kobj.sd, - NULL, "state"); + mdev->state_sysfs = sysfs_get_dirent(mdev->sdev->kobj.sd, "state"); if (!mdev->state_sysfs) { rc = -ENODEV; dev_err(&pdev->dev, "sysfs_get_dirent failed rc %d\n", rc); diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c index 0ab7c922212c..a511b2a713b3 100644 --- a/drivers/misc/tifm_core.c +++ b/drivers/misc/tifm_core.c @@ -145,15 +145,17 @@ static ssize_t type_show(struct device *dev, struct device_attribute *attr, struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); return sprintf(buf, "%x", sock->type); } +static DEVICE_ATTR_RO(type); -static struct device_attribute tifm_dev_attrs[] = { - __ATTR(type, S_IRUGO, type_show, NULL), - __ATTR_NULL +static struct attribute *tifm_dev_attrs[] = { + &dev_attr_type.attr, + NULL, }; +ATTRIBUTE_GROUPS(tifm_dev); static struct bus_type tifm_bus_type = { .name = "tifm", - .dev_attrs = tifm_dev_attrs, + .dev_groups = tifm_dev_groups, .match = tifm_bus_match, .uevent = tifm_uevent, .probe = tifm_device_probe, |