lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1466631652-25731-3-git-send-email-stuart.yoder@nxp.com>
Date:	Wed, 22 Jun 2016 16:40:43 -0500
From:	Stuart Yoder <stuart.yoder@....com>
To:	<gregkh@...uxfoundation.org>
CC:	<german.rivera@....com>, <devel@...verdev.osuosl.org>,
	<linux-kernel@...r.kernel.org>, <agraf@...e.de>, <arnd@...db.de>,
	<leoyang.li@....com>, Stuart Yoder <stuart.yoder@....com>
Subject: [PATCH 02/11] 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@....com>
---
 drivers/staging/fsl-mc/bus/mc-bus.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c
index d8776dd..cf92a1c 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;
 }
 
-- 
1.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ