Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 823a44ac authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

powerpc: ibmebus: 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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 892533e1
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -397,6 +397,7 @@ static ssize_t devspec_show(struct device *dev,
	ofdev = to_platform_device(dev);
	ofdev = to_platform_device(dev);
	return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
	return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
}
}
static DEVICE_ATTR_RO(devspec);


static ssize_t name_show(struct device *dev,
static ssize_t name_show(struct device *dev,
				struct device_attribute *attr, char *buf)
				struct device_attribute *attr, char *buf)
@@ -406,19 +407,22 @@ static ssize_t name_show(struct device *dev,
	ofdev = to_platform_device(dev);
	ofdev = to_platform_device(dev);
	return sprintf(buf, "%s\n", ofdev->dev.of_node->name);
	return sprintf(buf, "%s\n", ofdev->dev.of_node->name);
}
}
static DEVICE_ATTR_RO(name);


static ssize_t modalias_show(struct device *dev,
static ssize_t modalias_show(struct device *dev,
				struct device_attribute *attr, char *buf)
				struct device_attribute *attr, char *buf)
{
{
	return of_device_modalias(dev, buf, PAGE_SIZE);
	return of_device_modalias(dev, buf, PAGE_SIZE);
}
}
static DEVICE_ATTR_RO(modalias);


static struct device_attribute ibmebus_bus_device_attrs[] = {
static struct attribute *ibmebus_bus_device_attrs[] = {
	__ATTR_RO(devspec),
	&dev_attr_devspec.attr,
	__ATTR_RO(name),
	&dev_attr_name.attr,
	__ATTR_RO(modalias),
	&dev_attr_modalias.attr,
	__ATTR_NULL
	NULL,
};
};
ATTRIBUTE_GROUPS(ibmebus_bus_device);


struct bus_type ibmebus_bus_type = {
struct bus_type ibmebus_bus_type = {
	.name      = "ibmebus",
	.name      = "ibmebus",
@@ -428,7 +432,7 @@ struct bus_type ibmebus_bus_type = {
	.probe     = ibmebus_bus_device_probe,
	.probe     = ibmebus_bus_device_probe,
	.remove    = ibmebus_bus_device_remove,
	.remove    = ibmebus_bus_device_remove,
	.shutdown  = ibmebus_bus_device_shutdown,
	.shutdown  = ibmebus_bus_device_shutdown,
	.dev_attrs = ibmebus_bus_device_attrs,
	.dev_groups = ibmebus_bus_device_groups,
};
};
EXPORT_SYMBOL(ibmebus_bus_type);
EXPORT_SYMBOL(ibmebus_bus_type);