scsi: sd: Use sysfs_match_string()
authorMartin K. Petersen <martin.petersen@oracle.com>
Thu, 25 May 2017 13:34:30 +0000 (09:34 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 26 Jun 2017 19:00:58 +0000 (15:00 -0400)
commit4c11712ad0e1aa38154854a2a3efb1f4a90a059d
treef02a91f0e695252105aee1a3441657749fcb0d1f
parent6934be4f016311cf88c316dad5c75e4ccf8a7fc0
scsi: sd: Use sysfs_match_string()

Avoid unnecessary snprintf() when formatting variables for display in
sysfs and switch to sysfs_match_string() for validating user input.

Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c