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)
committerChristian Hoffmann <chrmhoffmann@gmail.com>
Sun, 12 Feb 2023 08:13:15 +0000 (09:13 +0100)
commitb0b33ba7a665dee68ad36bc432bdd091017346f1
tree3438e0a25cee14cd22292d189b50f3ebe8ae3094
parent6a6089ec43d785c24109c464aa38b981938b31ee
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>
Change-Id: Icf173608d9814e1aaf6bc05ed4223f893763960b
include/linux/string.h
lib/string.c