* [PATCH linux-next] PNP: replace !strcmp with sysfs_streq
@ 2022-10-08 8:01 yexingchen116
0 siblings, 0 replies; only message in thread
From: yexingchen116 @ 2022-10-08 8:01 UTC (permalink / raw)
To: miquel.raynal
Cc: richard, vigneshr, wsa+renesas, linux-mtd, linux-kernel, ye xingchen
From: ye xingchen <ye.xingchen@zte.com.cn>
Replace the open-code with sysfs_streq().
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/pnp/pnpacpi/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 38928ff7472b..d5748a21a7e1 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -317,7 +317,7 @@ static int __init pnpacpi_setup(char *str)
{
if (str == NULL)
return 1;
- if (!strncmp(str, "off", 3))
+ if (sysfs_streq(str, "off"))
pnpacpi_disabled = 1;
return 1;
}
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-08 8:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-08 8:01 [PATCH linux-next] PNP: replace !strcmp with sysfs_streq yexingchen116
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).