hsi: 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 hsi code to use the correct field. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
85dd92686f
commit
0017314689
1 changed files with 6 additions and 4 deletions
|
@ -33,11 +33,13 @@ static ssize_t modalias_show(struct device *dev,
|
||||||
{
|
{
|
||||||
return sprintf(buf, "hsi:%s\n", dev_name(dev));
|
return sprintf(buf, "hsi:%s\n", dev_name(dev));
|
||||||
}
|
}
|
||||||
|
static DEVICE_ATTR_RO(modalias);
|
||||||
|
|
||||||
static struct device_attribute hsi_bus_dev_attrs[] = {
|
static struct attribute *hsi_bus_dev_attrs[] = {
|
||||||
__ATTR_RO(modalias),
|
&dev_attr_modalias.attr,
|
||||||
__ATTR_NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
ATTRIBUTE_GROUPS(hsi_bus_dev);
|
||||||
|
|
||||||
static int hsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
|
static int hsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +55,7 @@ static int hsi_bus_match(struct device *dev, struct device_driver *driver)
|
||||||
|
|
||||||
static struct bus_type hsi_bus_type = {
|
static struct bus_type hsi_bus_type = {
|
||||||
.name = "hsi",
|
.name = "hsi",
|
||||||
.dev_attrs = hsi_bus_dev_attrs,
|
.dev_groups = hsi_bus_dev_groups,
|
||||||
.match = hsi_bus_match,
|
.match = hsi_bus_match,
|
||||||
.uevent = hsi_bus_uevent,
|
.uevent = hsi_bus_uevent,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue