Loading drivers/firewire/fw-device.c +13 −2 Original line number Original line Diff line number Diff line Loading @@ -348,8 +348,7 @@ static struct device_attribute fw_unit_attributes[] = { }; }; static ssize_t static ssize_t config_rom_show(struct device *dev, config_rom_show(struct device *dev, struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf) { { struct fw_device *device = fw_device(dev); struct fw_device *device = fw_device(dev); Loading @@ -358,8 +357,20 @@ config_rom_show(struct device *dev, return device->config_rom_length * 4; 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[] = { static struct device_attribute fw_device_attributes[] = { __ATTR_RO(config_rom), __ATTR_RO(config_rom), __ATTR_RO(guid), __ATTR_NULL, __ATTR_NULL, }; }; Loading Loading
drivers/firewire/fw-device.c +13 −2 Original line number Original line Diff line number Diff line Loading @@ -348,8 +348,7 @@ static struct device_attribute fw_unit_attributes[] = { }; }; static ssize_t static ssize_t config_rom_show(struct device *dev, config_rom_show(struct device *dev, struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf) { { struct fw_device *device = fw_device(dev); struct fw_device *device = fw_device(dev); Loading @@ -358,8 +357,20 @@ config_rom_show(struct device *dev, return device->config_rom_length * 4; 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[] = { static struct device_attribute fw_device_attributes[] = { __ATTR_RO(config_rom), __ATTR_RO(config_rom), __ATTR_RO(guid), __ATTR_NULL, __ATTR_NULL, }; }; Loading