Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / base / bus.c
index 33c270a..e243bd4 100644 (file)
@@ -20,7 +20,6 @@
 #include "power/power.h"
 
 #define to_bus_attr(_attr) container_of(_attr, struct bus_attribute, attr)
-#define to_bus(obj) container_of(obj, struct bus_type_private, subsys.kobj)
 
 /*
  * sysfs bindings for drivers
@@ -96,11 +95,11 @@ static ssize_t bus_attr_show(struct kobject *kobj, struct attribute *attr,
                             char *buf)
 {
        struct bus_attribute *bus_attr = to_bus_attr(attr);
-       struct bus_type_private *bus_priv = to_bus(kobj);
+       struct subsys_private *subsys_priv = to_subsys_private(kobj);
        ssize_t ret = 0;
 
        if (bus_attr->show)
-               ret = bus_attr->show(bus_priv->bus, buf);
+               ret = bus_attr->show(subsys_priv->bus, buf);
        return ret;
 }
 
@@ -108,11 +107,11 @@ static ssize_t bus_attr_store(struct kobject *kobj, struct attribute *attr,
                              const char *buf, size_t count)
 {
        struct bus_attribute *bus_attr = to_bus_attr(attr);
-       struct bus_type_private *bus_priv = to_bus(kobj);
+       struct subsys_private *subsys_priv = to_subsys_private(kobj);
        ssize_t ret = 0;
 
        if (bus_attr->store)
-               ret = bus_attr->store(bus_priv->bus, buf, count);
+               ret = bus_attr->store(subsys_priv->bus, buf, count);
        return ret;
 }
 
@@ -858,9 +857,9 @@ static BUS_ATTR(uevent, S_IWUSR, NULL, bus_uevent_store);
 int bus_register(struct bus_type *bus)
 {
        int retval;
-       struct bus_type_private *priv;
+       struct subsys_private *priv;
 
-       priv = kzalloc(sizeof(struct bus_type_private), GFP_KERNEL);
+       priv = kzalloc(sizeof(struct subsys_private), GFP_KERNEL);
        if (!priv)
                return -ENOMEM;