diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-08 01:27:38 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-08 09:34:56 (GMT) |
commit | aa7da564cab718d04c77e3a3c73926473e7a94f7 (patch) | |
tree | 15887b4d9850ebe8bd570e7688688e9b458964d5 /drivers/spi/spi.c | |
parent | 89da4293a7bb29ac42b7dd2c2573c8a5ebb0b6c7 (diff) | |
download | linux-fsl-qoriq-aa7da564cab718d04c77e3a3c73926473e7a94f7.tar.xz |
spi: 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 spi bus code to use the
correct field.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 1cd491f..7f8057f 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -58,11 +58,13 @@ modalias_show(struct device *dev, struct device_attribute *a, char *buf) return sprintf(buf, "%s%s\n", SPI_MODULE_PREFIX, spi->modalias); } +static DEVICE_ATTR_RO(modalias); -static struct device_attribute spi_dev_attrs[] = { - __ATTR_RO(modalias), - __ATTR_NULL, +static struct attribute *spi_dev_attrs[] = { + &dev_attr_modalias.attr, + NULL, }; +ATTRIBUTE_GROUPS(spi_dev); /* modalias support makes "modprobe $MODALIAS" new-style hotplug work, * and the sysfs version makes coldplug work too. @@ -229,7 +231,7 @@ static const struct dev_pm_ops spi_pm = { struct bus_type spi_bus_type = { .name = "spi", - .dev_attrs = spi_dev_attrs, + .dev_groups = spi_dev_groups, .match = spi_match_device, .uevent = spi_uevent, .pm = &spi_pm, |