diff options
author | Stuart Yoder <stuart.yoder@nxp.com> | 2016-06-22 16:40:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-26 17:14:03 -0700 |
commit | d568b7679f03aca820e61a758a8b034cff8ccb40 (patch) | |
tree | e5cd3e078eb15d4836e530b2cfdfd6ec4a4f8898 | |
parent | 3d579c350842c7a46da2da76b3461f7cfa3f6df9 (diff) | |
download | linux-d568b7679f03aca820e61a758a8b034cff8ccb40.tar.bz2 |
staging: fsl-mc: implement uevent callback and set the modalias
Replace placeholder code in the uevent callback to properly
set the MODALIAS env variable.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/fsl-mc/bus/mc-bus.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c index d8776dd89675..cf92a1cac28a 100644 --- a/drivers/staging/fsl-mc/bus/mc-bus.c +++ b/drivers/staging/fsl-mc/bus/mc-bus.c @@ -78,7 +78,13 @@ out: */ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) { - pr_debug("%s invoked\n", __func__); + struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev); + + if (add_uevent_var(env, "MODALIAS=fsl-mc:v%08Xd%s", + mc_dev->obj_desc.vendor, + mc_dev->obj_desc.type)) + return -ENOMEM; + return 0; } |