Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: aacraid: Added sysfs for driver version

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 <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Raghava Aditya Renukunta and committed by
Martin K. Petersen
30202e06 1bff5abc

+15
+15
drivers/scsi/aacraid/linit.c
··· 1131 1131 return len; 1132 1132 } 1133 1133 1134 + static ssize_t aac_show_driver_version(struct device *device, 1135 + struct device_attribute *attr, 1136 + char *buf) 1137 + { 1138 + return snprintf(buf, PAGE_SIZE, "%s\n", aac_driver_version); 1139 + } 1140 + 1134 1141 static ssize_t aac_show_serial_number(struct device *device, 1135 1142 struct device_attribute *attr, char *buf) 1136 1143 { ··· 1248 1241 }, 1249 1242 .show = aac_show_bios_version, 1250 1243 }; 1244 + static struct device_attribute aac_lld_version = { 1245 + .attr = { 1246 + .name = "driver_version", 1247 + .mode = 0444, 1248 + }, 1249 + .show = aac_show_driver_version, 1250 + }; 1251 1251 static struct device_attribute aac_serial_number = { 1252 1252 .attr = { 1253 1253 .name = "serial_number", ··· 1292 1278 &aac_kernel_version, 1293 1279 &aac_monitor_version, 1294 1280 &aac_bios_version, 1281 + &aac_lld_version, 1295 1282 &aac_serial_number, 1296 1283 &aac_max_channel, 1297 1284 &aac_max_id,