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-next>] [day] [month] [year] [list]
Message-Id: <200702170356.12600.hnguyen@linux.vnet.ibm.com>
Date:	Sat, 17 Feb 2007 03:56:12 +0100
From:	Hoang-Nam Nguyen <hnguyen@...ux.vnet.ibm.com>
To:	paulus@...ba.org, linuxppc-dev@...abs.org,
	linux-kernel@...r.kernel.org, johnrose@...ibm.com,
	Sylvain Munaut <tnt@...tnt.com>
Cc:	pmac@....ibm.com, fenkes@...ibm.com
Subject: [PATCH 2.6.21-rc1] ibmebus: Use of_device_uevent()

This patch replaces ibmebus_uevent() by Sylvain's generic function.


Signed-off-by: Joachim Fenkes <fenkes@...ibm.com>
---


 ibmebus.c |   37 +++----------------------------------
 1 file changed, 3 insertions(+), 34 deletions(-)


diff -urp a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
--- a/arch/powerpc/kernel/ibmebus.c	2007-02-17 03:25:53.403375784 +0100
+++ b/arch/powerpc/kernel/ibmebus.c	2007-02-17 03:27:28.230336112 +0100
@@ -372,41 +372,10 @@ static int ibmebus_bus_match(struct devi
 	return 0;
 }
 
-static int ibmebus_uevent(struct device *dev, char **envp, int num_envp,
-			char *buffer, int buffer_size)
-{
-	const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev);
-	char *name, *cp, *loc_code;
-	int length;
-
-	if (!num_envp)
-		return -ENOMEM;
-
-	if (!ebus_dev->ofdev.node)
-		return -ENODEV;
-
-	name = (char *)get_property(ebus_dev->ofdev.node, "name", NULL);
-	cp = (char *)get_property(ebus_dev->ofdev.node, "compatible", NULL);
-	loc_code = (char *)get_property(ebus_dev->ofdev.node,
-					"ibm,loc-code", NULL);
-	if (!(name && cp && loc_code))
-		return -ENODEV;
-
-	envp[0] = buffer;
-	length = scnprintf(buffer, buffer_size,
-			   "MODALIAS=ibmebus:T%s:S%s:L%s",
-			   name, cp, loc_code);
-	if (buffer_size - length <= 0)
-		return -ENOMEM;
-	envp[1] = NULL;
-
-	return 0;
-}
-
 struct bus_type ibmebus_bus_type = {
-	.name = "ibmebus",
-	.uevent = ibmebus_uevent,
-	.match = ibmebus_bus_match,
+	.name   = "ibmebus",
+	.uevent = of_device_uevent,
+	.match  = ibmebus_bus_match,
 };
 EXPORT_SYMBOL(ibmebus_bus_type);
 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ