mxcmmc: decrease minimum frequency to make MMC cards work
[safe/jmp/linux-2.6] / drivers / amba / bus.c
index 268e301..3d763fd 100644 (file)
 #include <linux/device.h>
 #include <linux/string.h>
 #include <linux/slab.h>
+#include <linux/io.h>
 #include <linux/amba/bus.h>
 
-#include <asm/io.h>
+#include <asm/irq.h>
 #include <asm/sizes.h>
 
 #define to_amba_device(d)      container_of(d, struct amba_device, dev)
@@ -44,15 +45,12 @@ static int amba_match(struct device *dev, struct device_driver *drv)
 }
 
 #ifdef CONFIG_HOTPLUG
-static int amba_uevent(struct device *dev, char **envp, int nr_env, char *buf, int bufsz)
+static int amba_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
        struct amba_device *pcdev = to_amba_device(dev);
-       int retval = 0, i = 0, len = 0;
+       int retval = 0;
 
-       retval = add_uevent_var(envp, nr_env, &i,
-                               buf, bufsz, &len,
-                               "AMBA_ID=%08x", pcdev->periphid);
-       envp[i] = NULL;
+       retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid);
        return retval;
 }
 #else
@@ -212,7 +210,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
        dev->dev.release = amba_device_release;
        dev->dev.bus = &amba_bustype;
        dev->dev.dma_mask = &dev->dma_mask;
-       dev->res.name = dev->dev.bus_id;
+       dev->res.name = dev_name(&dev->dev);
 
        if (!dev->dev.coherent_dma_mask && dev->dma_mask)
                dev_warn(&dev->dev, "coherent dma mask is unset\n");
@@ -296,7 +294,7 @@ static int amba_find_match(struct device *dev, void *data)
        if (d->parent)
                r &= d->parent == dev->parent;
        if (d->busid)
-               r &= strcmp(dev->bus_id, d->busid) == 0;
+               r &= strcmp(dev_name(dev), d->busid) == 0;
 
        if (r) {
                get_device(dev);