Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bbd1494580462fa35bdd2073dba3902fb53981bf
Commit:     bbd1494580462fa35bdd2073dba3902fb53981bf
Parent:     7feb9cce2d07bea635256a2e226d7ca7a9f4585f
Author:     Kristian Høgsberg <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 20 20:58:35 2007 -0400
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Thu Mar 22 00:48:50 2007 +0100

    firewire: Export GUID as sysfs attribute.
    
    Signed-off-by: Kristian Høgsberg <[EMAIL PROTECTED]>
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
 drivers/firewire/fw-device.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
index 71bb9d1..2bf86aa 100644
--- a/drivers/firewire/fw-device.c
+++ b/drivers/firewire/fw-device.c
@@ -348,8 +348,7 @@ static struct device_attribute fw_unit_attributes[] = {
 };
 
 static ssize_t
-config_rom_show(struct device *dev,
-               struct device_attribute *attr, char *buf)
+config_rom_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
        struct fw_device *device = fw_device(dev);
 
@@ -358,8 +357,20 @@ config_rom_show(struct device *dev,
        return device->config_rom_length * 4;
 }
 
+static ssize_t
+guid_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+       struct fw_device *device = fw_device(dev);
+       u64 guid;
+
+       guid = ((u64)device->config_rom[3] << 32) | device->config_rom[4];
+
+       return snprintf(buf, PAGE_SIZE, "0x%016llx\n", guid);
+}
+
 static struct device_attribute fw_device_attributes[] = {
        __ATTR_RO(config_rom),
+       __ATTR_RO(guid),
        __ATTR_NULL,
 };
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to