From: Paul Cercueil Date: Mon, 11 Feb 2019 17:14:48 +0000 (-0600) Subject: usb: musb: jz4740: Add support for devicetree X-Git-Tag: v5.1-rc1~142^2~47 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e2d5e09485fc5363d4be58ae04303e54a5956aa7;p=linux.git usb: musb: jz4740: Add support for devicetree Add support for probing the driver from devicetree. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c index 04d8b2bc205a..a60627bf7be3 100644 --- a/drivers/usb/musb/jz4740.c +++ b/drivers/usb/musb/jz4740.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -188,11 +189,20 @@ static int jz4740_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id jz4740_musb_of_match[] = { + { .compatible = "ingenic,jz4740-musb" }, + {}, +}; +MODULE_DEVICE_TABLE(of, jz4740_musb_of_match); +#endif + static struct platform_driver jz4740_driver = { .probe = jz4740_probe, .remove = jz4740_remove, .driver = { .name = "musb-jz4740", + .of_match_table = of_match_ptr(jz4740_musb_of_match), }, };