forked from luck/tmp_suning_uos_patched
parisc: parisc_bus_type: 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: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Helge Deller <deller@gmx.de> Cc: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Doug Ledford <dledford@redhat.com> Cc: <linux-parisc@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
136e882fcc
commit
9b7c668227
|
@ -575,7 +575,8 @@ static ssize_t name##_show(struct device *dev, struct device_attribute *attr, ch
|
||||||
{ \
|
{ \
|
||||||
struct parisc_device *padev = to_parisc_device(dev); \
|
struct parisc_device *padev = to_parisc_device(dev); \
|
||||||
return sprintf(buf, format_string, padev->field); \
|
return sprintf(buf, format_string, padev->field); \
|
||||||
}
|
} \
|
||||||
|
static DEVICE_ATTR_RO(name);
|
||||||
|
|
||||||
#define pa_dev_attr_id(field, format) pa_dev_attr(field, id.field, format)
|
#define pa_dev_attr_id(field, format) pa_dev_attr(field, id.field, format)
|
||||||
|
|
||||||
|
@ -589,22 +590,24 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
|
||||||
{
|
{
|
||||||
return make_modalias(dev, buf);
|
return make_modalias(dev, buf);
|
||||||
}
|
}
|
||||||
|
static DEVICE_ATTR_RO(modalias);
|
||||||
|
|
||||||
static struct device_attribute parisc_device_attrs[] = {
|
static struct attribute *parisc_device_attrs[] = {
|
||||||
__ATTR_RO(irq),
|
&dev_attr_irq.attr,
|
||||||
__ATTR_RO(hw_type),
|
&dev_attr_hw_type.attr,
|
||||||
__ATTR_RO(rev),
|
&dev_attr_rev.attr,
|
||||||
__ATTR_RO(hversion),
|
&dev_attr_hversion.attr,
|
||||||
__ATTR_RO(sversion),
|
&dev_attr_sversion.attr,
|
||||||
__ATTR_RO(modalias),
|
&dev_attr_modalias.attr,
|
||||||
__ATTR_NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
ATTRIBUTE_GROUPS(parisc_device);
|
||||||
|
|
||||||
struct bus_type parisc_bus_type = {
|
struct bus_type parisc_bus_type = {
|
||||||
.name = "parisc",
|
.name = "parisc",
|
||||||
.match = parisc_generic_match,
|
.match = parisc_generic_match,
|
||||||
.uevent = parisc_uevent,
|
.uevent = parisc_uevent,
|
||||||
.dev_attrs = parisc_device_attrs,
|
.dev_groups = parisc_device_groups,
|
||||||
.probe = parisc_driver_probe,
|
.probe = parisc_driver_probe,
|
||||||
.remove = parisc_driver_remove,
|
.remove = parisc_driver_remove,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user