diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 674a65c1a130..85740ae5d689 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1670,10 +1670,34 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | |||
1670 | return sprintf(buf, "ide:m-%s\n", media_string(drive)); | 1670 | return sprintf(buf, "ide:m-%s\n", media_string(drive)); |
1671 | } | 1671 | } |
1672 | 1672 | ||
1673 | static ssize_t model_show(struct device *dev, struct device_attribute *attr, | ||
1674 | char *buf) | ||
1675 | { | ||
1676 | ide_drive_t *drive = to_ide_device(dev); | ||
1677 | return sprintf(buf, "%s\n", drive->id->model); | ||
1678 | } | ||
1679 | |||
1680 | static ssize_t firmware_show(struct device *dev, struct device_attribute *attr, | ||
1681 | char *buf) | ||
1682 | { | ||
1683 | ide_drive_t *drive = to_ide_device(dev); | ||
1684 | return sprintf(buf, "%s\n", drive->id->fw_rev); | ||
1685 | } | ||
1686 | |||
1687 | static ssize_t serial_show(struct device *dev, struct device_attribute *attr, | ||
1688 | char *buf) | ||
1689 | { | ||
1690 | ide_drive_t *drive = to_ide_device(dev); | ||
1691 | return sprintf(buf, "%s\n", drive->id->serial_no); | ||
1692 | } | ||
1693 | |||
1673 | static struct device_attribute ide_dev_attrs[] = { | 1694 | static struct device_attribute ide_dev_attrs[] = { |
1674 | __ATTR_RO(media), | 1695 | __ATTR_RO(media), |
1675 | __ATTR_RO(drivename), | 1696 | __ATTR_RO(drivename), |
1676 | __ATTR_RO(modalias), | 1697 | __ATTR_RO(modalias), |
1698 | __ATTR_RO(model), | ||
1699 | __ATTR_RO(firmware), | ||
1700 | __ATTR(serial, 0400, serial_show, NULL), | ||
1677 | __ATTR_NULL | 1701 | __ATTR_NULL |
1678 | }; | 1702 | }; |
1679 | 1703 | ||