mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
rpmsg: 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: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: <linux-remoteproc@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
966449a3d8
commit
39afc7af15
1 changed files with 12 additions and 9 deletions
|
@ -330,7 +330,8 @@ field##_show(struct device *dev, \
|
||||||
struct rpmsg_device *rpdev = to_rpmsg_device(dev); \
|
struct rpmsg_device *rpdev = to_rpmsg_device(dev); \
|
||||||
\
|
\
|
||||||
return sprintf(buf, format_string, rpdev->path); \
|
return sprintf(buf, format_string, rpdev->path); \
|
||||||
}
|
} \
|
||||||
|
static DEVICE_ATTR_RO(field);
|
||||||
|
|
||||||
/* for more info, see Documentation/ABI/testing/sysfs-bus-rpmsg */
|
/* for more info, see Documentation/ABI/testing/sysfs-bus-rpmsg */
|
||||||
rpmsg_show_attr(name, id.name, "%s\n");
|
rpmsg_show_attr(name, id.name, "%s\n");
|
||||||
|
@ -345,15 +346,17 @@ static ssize_t modalias_show(struct device *dev,
|
||||||
|
|
||||||
return sprintf(buf, RPMSG_DEVICE_MODALIAS_FMT "\n", rpdev->id.name);
|
return sprintf(buf, RPMSG_DEVICE_MODALIAS_FMT "\n", rpdev->id.name);
|
||||||
}
|
}
|
||||||
|
static DEVICE_ATTR_RO(modalias);
|
||||||
|
|
||||||
static struct device_attribute rpmsg_dev_attrs[] = {
|
static struct attribute *rpmsg_dev_attrs[] = {
|
||||||
__ATTR_RO(name),
|
&dev_attr_name.attr,
|
||||||
__ATTR_RO(modalias),
|
&dev_attr_modalias.attr,
|
||||||
__ATTR_RO(dst),
|
&dev_attr_dst.attr,
|
||||||
__ATTR_RO(src),
|
&dev_attr_src.attr,
|
||||||
__ATTR_RO(announce),
|
&dev_attr_announce.attr,
|
||||||
__ATTR_NULL
|
NULL,
|
||||||
};
|
};
|
||||||
|
ATTRIBUTE_GROUPS(rpmsg_dev);
|
||||||
|
|
||||||
/* rpmsg devices and drivers are matched using the service name */
|
/* rpmsg devices and drivers are matched using the service name */
|
||||||
static inline int rpmsg_id_match(const struct rpmsg_device *rpdev,
|
static inline int rpmsg_id_match(const struct rpmsg_device *rpdev,
|
||||||
|
@ -455,7 +458,7 @@ static int rpmsg_dev_remove(struct device *dev)
|
||||||
static struct bus_type rpmsg_bus = {
|
static struct bus_type rpmsg_bus = {
|
||||||
.name = "rpmsg",
|
.name = "rpmsg",
|
||||||
.match = rpmsg_dev_match,
|
.match = rpmsg_dev_match,
|
||||||
.dev_attrs = rpmsg_dev_attrs,
|
.dev_groups = rpmsg_dev_groups,
|
||||||
.uevent = rpmsg_uevent,
|
.uevent = rpmsg_uevent,
|
||||||
.probe = rpmsg_dev_probe,
|
.probe = rpmsg_dev_probe,
|
||||||
.remove = rpmsg_dev_remove,
|
.remove = rpmsg_dev_remove,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue