]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mtd: hyperbus: rpc-if: Add missing MODULE_DEVICE_TABLE
authorBiju Das <biju.das.jz@bp.renesas.com>
Wed, 31 Jul 2024 08:08:40 +0000 (09:08 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 21 Oct 2024 09:17:34 +0000 (11:17 +0200)
The rpc-if-hyperflash driver can be compiled as a module, but lacks
MODULE_DEVICE_TABLE() and will therefore not be loaded automatically.
Fix this.

Fixes: 5de15b610f78 ("mtd: hyperbus: add Renesas RPC-IF driver")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240731080846.257139-1-biju.das.jz@bp.renesas.com
drivers/mtd/hyperbus/rpc-if.c

index b22aa57119f238765266f5c89c12c17981b0e03f..e7a28f3316c3f24b22c6853989aa59d43cce1aa0 100644 (file)
@@ -163,9 +163,16 @@ static void rpcif_hb_remove(struct platform_device *pdev)
        pm_runtime_disable(hyperbus->rpc.dev);
 }
 
+static const struct platform_device_id rpc_if_hyperflash_id_table[] = {
+       { .name = "rpc-if-hyperflash" },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, rpc_if_hyperflash_id_table);
+
 static struct platform_driver rpcif_platform_driver = {
        .probe  = rpcif_hb_probe,
        .remove_new = rpcif_hb_remove,
+       .id_table = rpc_if_hyperflash_id_table,
        .driver = {
                .name   = "rpc-if-hyperflash",
        },