Skip to content

Commit e4ad279

Browse files
zevweissarndb
authored andcommitted
soc: aspeed: uart-routing: Use __sysfs_match_string
The existing use of match_string() caused it to reject 'echo foo' due to the implicitly appended newline, which was somewhat ergonomically awkward and inconsistent with typical sysfs behavior. Using the __sysfs_* variant instead provides more convenient and consistent linefeed-agnostic behavior. Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Fixes: c680797 ("soc: aspeed: Add UART routing support") Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20230628083735.19946-2-zev@bewilderbeest.net Signed-off-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20230810122941.231085-1-joel@jms.id.au Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 42ff49a commit e4ad279

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/aspeed/aspeed-uart-routing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static ssize_t aspeed_uart_routing_store(struct device *dev,
524524
struct aspeed_uart_routing_selector *sel = to_routing_selector(attr);
525525
int val;
526526

527-
val = match_string(sel->options, -1, buf);
527+
val = __sysfs_match_string(sel->options, -1, buf);
528528
if (val < 0) {
529529
dev_err(dev, "invalid value \"%s\"\n", buf);
530530
return -EINVAL;

0 commit comments

Comments
 (0)