Re: [PATCH V2 06/15] aacraid: Added sysfs for driver version

2017-02-17 Thread Johannes Thumshirn
On 02/16/2017 09:51 PM, Raghava Aditya Renukunta wrote:
> Added support to retrieve driver version from a new sysfs variable called
> driver_version. It makes it easier for the user to figure out the driver
> version that is currently running.
> 
> Signed-off-by: Raghava Aditya Renukunta 
> 
> Reviewed-by: David Carroll 
> 
> ---


Thanks,
Reviewed-by: Johannes Thumshirn 

-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850


[PATCH V2 06/15] aacraid: Added sysfs for driver version

2017-02-16 Thread Raghava Aditya Renukunta
Added support to retrieve driver version from a new sysfs variable called
driver_version. It makes it easier for the user to figure out the driver
version that is currently running.

Signed-off-by: Raghava Aditya Renukunta 
Reviewed-by: David Carroll 

---
Changes in V2:
None

 drivers/scsi/aacraid/linit.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index ab4f1e7..df02784 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1131,6 +1131,13 @@ static ssize_t aac_show_bios_version(struct device 
*device,
return len;
 }
 
+static ssize_t aac_show_driver_version(struct device *device,
+   struct device_attribute *attr,
+   char *buf)
+{
+   return snprintf(buf, PAGE_SIZE, "%s\n", aac_driver_version);
+}
+
 static ssize_t aac_show_serial_number(struct device *device,
   struct device_attribute *attr, char *buf)
 {
@@ -1241,6 +1248,13 @@ static struct device_attribute aac_bios_version = {
},
.show = aac_show_bios_version,
 };
+static struct device_attribute aac_lld_version = {
+   .attr = {
+   .name = "driver_version",
+   .mode = 0444,
+   },
+   .show = aac_show_driver_version,
+};
 static struct device_attribute aac_serial_number = {
.attr = {
.name = "serial_number",
@@ -1278,6 +1292,7 @@ static struct device_attribute *aac_attrs[] = {
_kernel_version,
_monitor_version,
_bios_version,
+   _lld_version,
_serial_number,
_max_channel,
_max_id,
-- 
2.7.4