Input: Fully open-code compatible for grepping
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 13 Jun 2025 07:16:54 +0000 (09:16 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 17 Jun 2025 21:12:32 +0000 (14:12 -0700)
It is very useful to find driver implementing compatibles with `git grep
compatible`, so driver should not use defines for that string, even if
this means string will be effectively duplicated.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250613071653.46809-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/gpio-beeper.c
drivers/input/touchscreen/melfas_mip4.c

index d2d2954e2f794638c0f3758c13924c9b2c8ffff7..3d65cb4f4ef32c4ffa73160b6add451a66a242d3 100644 (file)
@@ -94,7 +94,7 @@ static int gpio_beeper_probe(struct platform_device *pdev)
 
 #ifdef CONFIG_OF
 static const struct of_device_id gpio_beeper_of_match[] = {
-       { .compatible = BEEPER_MODNAME, },
+       { .compatible = "gpio-beeper", },
        { }
 };
 MODULE_DEVICE_TABLE(of, gpio_beeper_of_match);
index a6946e3d8376d7e9b4c26f4194409e0ba78bb075..8698842199089e8906d4ebdaf5d80c5c81854ad5 100644 (file)
@@ -1554,7 +1554,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(mip4_pm_ops, mip4_suspend, mip4_resume);
 
 #ifdef CONFIG_OF
 static const struct of_device_id mip4_of_match[] = {
-       { .compatible = "melfas,"MIP4_DEVICE_NAME, },
+       { .compatible = "melfas,mip4_ts", },
        { },
 };
 MODULE_DEVICE_TABLE(of, mip4_of_match);