diff mbox series

mtd: hyperbus: rpc-if: Add missing MODULE_DEVICE_TABLE

Message ID 20240731080846.257139-1-biju.das.jz@bp.renesas.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series mtd: hyperbus: rpc-if: Add missing MODULE_DEVICE_TABLE | expand

Commit Message

Biju Das July 31, 2024, 8:08 a.m. UTC
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>
---
Note:
 Only compile tested. Changes are similar to [1]
 [1] https://lore.kernel.org/all/20240731072955.224125-1-biju.das.jz@bp.renesas.com/
---
 drivers/mtd/hyperbus/rpc-if.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Geert Uytterhoeven July 31, 2024, 8:28 a.m. UTC | #1
On Wed, Jul 31, 2024 at 10:08 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> 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>

Gr{oetje,eeting}s,

                        Geert
Vignesh Raghavendra Aug. 6, 2024, 5:16 p.m. UTC | #2
On 31/07/24 13:38, Biju Das wrote:
> 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: Vignesh Raghavendra <vigneshr@ti.com>


> Note:
>  Only compile tested. Changes are similar to [1]
>  [1] https://lore.kernel.org/all/20240731072955.224125-1-biju.das.jz@bp.renesas.com/
> ---
>  drivers/mtd/hyperbus/rpc-if.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/mtd/hyperbus/rpc-if.c b/drivers/mtd/hyperbus/rpc-if.c
> index b22aa57119f2..e7a28f3316c3 100644
> --- a/drivers/mtd/hyperbus/rpc-if.c
> +++ b/drivers/mtd/hyperbus/rpc-if.c
> @@ -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",
>  	},
Miquel Raynal Aug. 23, 2024, 5:31 p.m. UTC | #3
On Wed, 2024-07-31 at 08:08:40 UTC, Biju Das wrote:
> 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>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.

Miquel
diff mbox series

Patch

diff --git a/drivers/mtd/hyperbus/rpc-if.c b/drivers/mtd/hyperbus/rpc-if.c
index b22aa57119f2..e7a28f3316c3 100644
--- a/drivers/mtd/hyperbus/rpc-if.c
+++ b/drivers/mtd/hyperbus/rpc-if.c
@@ -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",
 	},