]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
greybus: arche-ctrl: move device table to its right location
authorArnd Bergmann <arnd@arndb.de>
Wed, 3 Apr 2024 08:06:35 +0000 (10:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2024 15:51:31 +0000 (17:51 +0200)
The arche-ctrl has two platform drivers and three of_device_id tables,
but one table is only used for the the module loader, while the other
two seem to be associated with their drivers.

This leads to a W=1 warning when the driver is built-in:

drivers/staging/greybus/arche-platform.c:623:34: error: 'arche_combined_id' defined but not used [-Werror=unused-const-variable=]
  623 | static const struct of_device_id arche_combined_id[] = {

Drop the extra table and register both tables that are actually
used as the ones for the module loader instead.

Fixes: 7b62b61c752a ("greybus: arche-ctrl: Don't expose driver internals to arche-platform driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240403080702.3509288-18-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/arche-apb-ctrl.c
drivers/staging/greybus/arche-platform.c

index 8541995008da86301651268bb0ad9811715f3fa4..aa6f266b62a1417408e11b68f2f624b4c40bec7d 100644 (file)
@@ -466,6 +466,7 @@ static const struct of_device_id arche_apb_ctrl_of_match[] = {
        { .compatible = "usbffff,2", },
        { },
 };
+MODULE_DEVICE_TABLE(of, arche_apb_ctrl_of_match);
 
 static struct platform_driver arche_apb_ctrl_device_driver = {
        .probe          = arche_apb_ctrl_probe,
index 891b75327d7f73714e014910df6f37853b50448e..b33977ccd5271064a1b588df6e529e1684c2d190 100644 (file)
@@ -619,14 +619,7 @@ static const struct of_device_id arche_platform_of_match[] = {
        { .compatible = "google,arche-platform", },
        { },
 };
-
-static const struct of_device_id arche_combined_id[] = {
-       /* Use PID/VID of SVC device */
-       { .compatible = "google,arche-platform", },
-       { .compatible = "usbffff,2", },
-       { },
-};
-MODULE_DEVICE_TABLE(of, arche_combined_id);
+MODULE_DEVICE_TABLE(of, arche_platform_of_match);
 
 static struct platform_driver arche_platform_device_driver = {
        .probe          = arche_platform_probe,