From: Greg Kroah-Hartman Date: Tue, 6 Jun 2017 13:48:11 +0000 (+0200) Subject: tty: serdev: use dev_groups and not dev_attrs for bus_type X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4fe99816a1ab0323c39949bd0ee99a97b7e5875f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tty: serdev: use dev_groups and not dev_attrs for bus_type The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Rob Herring Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index 433de5ea9b02..e454162d8c6e 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -250,11 +250,13 @@ static ssize_t modalias_show(struct device *dev, { return of_device_modalias(dev, buf, PAGE_SIZE); } +DEVICE_ATTR_RO(modalias); -static struct device_attribute serdev_device_attrs[] = { - __ATTR_RO(modalias), - __ATTR_NULL +static struct attribute *serdev_device_attrs[] = { + &dev_attr_modalias.attr, + NULL, }; +ATTRIBUTE_GROUPS(serdev_device); static struct bus_type serdev_bus_type = { .name = "serial", @@ -262,7 +264,7 @@ static struct bus_type serdev_bus_type = { .probe = serdev_drv_probe, .remove = serdev_drv_remove, .uevent = serdev_uevent, - .dev_attrs = serdev_device_attrs, + .dev_groups = serdev_device_groups, }; /**