lib/string: add sysfs_match_string helper
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 21 Mar 2017 11:56:46 +0000 (13:56 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:17 +0000 (15:36 -0500)
commitf8db97683df5251731308a70da1163746f01bc93
tree65b8832e6de6ed40b17a317b3bb02d771351efeb
parentf6d6492aa1083c669f1a9646ad598bf492078cec
lib/string: add sysfs_match_string helper

Make a simple helper for matching strings with sysfs
attribute files. In most parts the same as match_string(),
except sysfs_match_string() uses sysfs_streq() instead of
strcmp() for matching. This is more convenient when used
with sysfs attributes.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e1fe7b6a7b376bfb54558725ddb2a89aaaa4adcc)
include/linux/string.h
lib/string.c