X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Famba%2Fbus.c;h=00c46e0b40e47eec54b2710f06cbe59d7308905f;hb=c06b4889c340da483d35a877ef9195c0401319b9;hp=fd5475071accea2d48ff5ec7f15270d61409a27b;hpb=9cdf083f981b8d37b3212400a359368661385099;p=mv-sheeva.git diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index fd5475071ac..00c46e0b40e 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -12,9 +12,10 @@ #include #include #include +#include #include -#include +#include #include #define to_amba_device(d) container_of(d, struct amba_device, dev) @@ -44,17 +45,13 @@ 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; - if (nr_env < 2) - return -ENOMEM; - - snprintf(buf, bufsz, "AMBA_ID=%08x", pcdev->periphid); - *envp++ = buf; - *envp++ = NULL; - return 0; + retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid); + return retval; } #else #define amba_uevent NULL