Displaying 1 result from an estimated 1 matches for "acpi_device_setup_files".
2008 Dec 25
0
[PATCH 1/4] dom0 linux: Expose HID, UID, SEG, BBN of PCI root bridge via sysfs.
...ware_id);
+}
+ACPI_DEVICE_ATTR(hid, 0444, acpi_device_hid_show, NULL);
+
+static ssize_t
+acpi_device_uid_show(struct acpi_device *acpi_dev, char *buf) 
+{
+	return sprintf(buf, "%s\n", acpi_dev->pnp.unique_id);
+}
+ACPI_DEVICE_ATTR(uid, 0444, acpi_device_uid_show, NULL);
+
+static int acpi_device_setup_files(struct acpi_device *dev)
+{
+	int result = 0;
+
+	if (dev->flags.hardware_id) {
+		result = sysfs_create_file(&dev->kobj,
+					&acpi_device_attr_hid.attr);
+		if (result)
+			goto end;
+	}
+
+	if (dev->flags.unique_id) {
+		result = sysfs_create_file(&dev->kobj,
+					&...