Re: [PATCH] Export smbios strings associated with onboard devices to sysfs

From
Greg KH <hidden>
Date
2010-02-25 22:55:33
Reply to
Narendra K, 2010-02-25
On Thu, Feb 25, 2010 at 02:29:42PM -0600, Narendra K wrote:
quoted hunk ↗ jump to hunk
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -419,6 +419,11 @@ static int device_add_attrs(struct bus_type *bus, struct device *dev)
 		return 0;
 
 	for (i = 0; attr_name(bus->dev_attrs[i]); i++) {
+		/* if the device does not have an associated smbios string in the smbios table, do not create this attribute */ 
+		if (!(strcmp(attr_name(bus->dev_attrs[i]), "smbiosname"))) {
+			if (!smbiosname_string_is_valid(dev, NULL)) 
+				continue;
+		}
Um, no, you can not modify the driver core for stuff like this.  Do it
in your driver or class specific code, as that is where it is supposed
to be.

good luck,

greg k-h
Thread (7 messages) 7 messages, 4 authors, last reply 2010-03-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help