Commit 7ac0326c authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

uevent environment changes fallout

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4735b37c
...@@ -96,30 +96,23 @@ static int sdio_bus_match(struct device *dev, struct device_driver *drv) ...@@ -96,30 +96,23 @@ static int sdio_bus_match(struct device *dev, struct device_driver *drv)
} }
static int static int
sdio_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf, sdio_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
int buf_size)
{ {
struct sdio_func *func = dev_to_sdio_func(dev); struct sdio_func *func = dev_to_sdio_func(dev);
int i = 0, length = 0;
if (add_uevent_var(envp, num_envp, &i, if (add_uevent_var(env,
buf, buf_size, &length,
"SDIO_CLASS=%02X", func->class)) "SDIO_CLASS=%02X", func->class))
return -ENOMEM; return -ENOMEM;
if (add_uevent_var(envp, num_envp, &i, if (add_uevent_var(env,
buf, buf_size, &length,
"SDIO_ID=%04X:%04X", func->vendor, func->device)) "SDIO_ID=%04X:%04X", func->vendor, func->device))
return -ENOMEM; return -ENOMEM;
if (add_uevent_var(envp, num_envp, &i, if (add_uevent_var(env,
buf, buf_size, &length,
"MODALIAS=sdio:c%02Xv%04Xd%04X", "MODALIAS=sdio:c%02Xv%04Xd%04X",
func->class, func->vendor, func->device)) func->class, func->vendor, func->device))
return -ENOMEM; return -ENOMEM;
envp[i] = NULL;
return 0; return 0;
} }
......
...@@ -321,23 +321,17 @@ static int ssb_bus_match(struct device *dev, struct device_driver *drv) ...@@ -321,23 +321,17 @@ static int ssb_bus_match(struct device *dev, struct device_driver *drv)
return 0; return 0;
} }
static int ssb_device_uevent(struct device *dev, char **envp, int num_envp, static int ssb_device_uevent(struct device *dev, struct kobj_uevent_env *env)
char *buffer, int buffer_size)
{ {
struct ssb_device *ssb_dev = dev_to_ssb_dev(dev); struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
int ret, i = 0, length = 0;
if (!dev) if (!dev)
return -ENODEV; return -ENODEV;
ret = add_uevent_var(envp, num_envp, &i, return add_uevent_var(env,
buffer, buffer_size, &length,
"MODALIAS=ssb:v%04Xid%04Xrev%02X", "MODALIAS=ssb:v%04Xid%04Xrev%02X",
ssb_dev->id.vendor, ssb_dev->id.coreid, ssb_dev->id.vendor, ssb_dev->id.coreid,
ssb_dev->id.revision); ssb_dev->id.revision);
envp[i] = NULL;
return ret;
} }
static struct bus_type ssb_bustype = { static struct bus_type ssb_bustype = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment