diff options
Diffstat (limited to 'drivers/amba')
| -rw-r--r-- | drivers/amba/bus.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index fd5475071acc..268e301775fc 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c | |||
| @@ -47,14 +47,13 @@ static int amba_match(struct device *dev, struct device_driver *drv) | |||
| 47 | static int amba_uevent(struct device *dev, char **envp, int nr_env, char *buf, int bufsz) | 47 | static int amba_uevent(struct device *dev, char **envp, int nr_env, char *buf, int bufsz) |
| 48 | { | 48 | { |
| 49 | struct amba_device *pcdev = to_amba_device(dev); | 49 | struct amba_device *pcdev = to_amba_device(dev); |
| 50 | int retval = 0, i = 0, len = 0; | ||
| 50 | 51 | ||
| 51 | if (nr_env < 2) | 52 | retval = add_uevent_var(envp, nr_env, &i, |
| 52 | return -ENOMEM; | 53 | buf, bufsz, &len, |
| 53 | 54 | "AMBA_ID=%08x", pcdev->periphid); | |
| 54 | snprintf(buf, bufsz, "AMBA_ID=%08x", pcdev->periphid); | 55 | envp[i] = NULL; |
| 55 | *envp++ = buf; | 56 | return retval; |
| 56 | *envp++ = NULL; | ||
| 57 | return 0; | ||
| 58 | } | 57 | } |
| 59 | #else | 58 | #else |
| 60 | #define amba_uevent NULL | 59 | #define amba_uevent NULL |
