Merge tag 'mmc-updates-for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-drm-fsl-dcu.git] / drivers / mmc / core / bus.c
index cdca8a70da38bfcc9cace78dde9afe563afaef24..64145a32b917b37ce862e392fe3600417c99c336 100644 (file)
@@ -27,7 +27,7 @@
 
 #define to_mmc_driver(d)       container_of(d, struct mmc_driver, drv)
 
-static ssize_t mmc_type_show(struct device *dev,
+static ssize_t type_show(struct device *dev,
        struct device_attribute *attr, char *buf)
 {
        struct mmc_card *card = mmc_dev_to_card(dev);
@@ -45,11 +45,13 @@ static ssize_t mmc_type_show(struct device *dev,
                return -EFAULT;
        }
 }
+static DEVICE_ATTR_RO(type);
 
-static struct device_attribute mmc_dev_attrs[] = {
-       __ATTR(type, S_IRUGO, mmc_type_show, NULL),
-       __ATTR_NULL,
+static struct attribute *mmc_dev_attrs[] = {
+       &dev_attr_type.attr,
+       NULL,
 };
+ATTRIBUTE_GROUPS(mmc_dev);
 
 /*
  * This currently matches any MMC driver to any MMC card - drivers
@@ -218,7 +220,7 @@ static const struct dev_pm_ops mmc_bus_pm_ops = {
 
 static struct bus_type mmc_bus_type = {
        .name           = "mmc",
-       .dev_attrs      = mmc_dev_attrs,
+       .dev_groups     = mmc_dev_groups,
        .match          = mmc_bus_match,
        .uevent         = mmc_bus_uevent,
        .probe          = mmc_bus_probe,