Skip to contentSkip to conversation

EISA: Use str_plural() in eisa_probe()

PATCH New Thorsten Blum 1 participant 1 message Jul 24

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EISA: Use str_plural() in eisa_probe()

Replace the manual ternary "s" pluralization with str_plural() to simplify the code.

---
 drivers/eisa/eisa-bus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/eisa/eisa-bus.c +2 -1
index 79ab44fe26aa..73c4ba3dc0bc 100644
@@ -12,6 +12,7 @@
 #include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/string_choices.h>
 #include <linux/ioport.h>
 #include <asm/io.h>
 
@@ -393,7 +394,7 @@ static int __init eisa_probe(struct eisa_root_device *root)
 		}
 	}
 
-	dev_info(root->dev, "EISA: Detected %d card%s\n", c, c == 1 ? "" : "s");
+	dev_info(root->dev, "EISA: Detected %d card%s\n", c, str_plural(c));
 	return 0;
 }