usb: host: fotg2: add device tree probing
Add device tree probing to the fotg2 driver. Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> [Drop DMA mask coercion, drivers/of/platform.c does the job] Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
ae748b9cf8
commit
d7863de8cd
@@ -10,6 +10,7 @@
|
|||||||
* Most of code borrowed from the Linux-3.7 EHCI driver
|
* Most of code borrowed from the Linux-3.7 EHCI driver
|
||||||
*/
|
*/
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/dmapool.h>
|
#include <linux/dmapool.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
@@ -5669,9 +5670,18 @@ static int fotg210_hcd_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
static const struct of_device_id fotg210_of_match[] = {
|
||||||
|
{ .compatible = "faraday,fotg210" },
|
||||||
|
{},
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, fotg210_of_match);
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct platform_driver fotg210_hcd_driver = {
|
static struct platform_driver fotg210_hcd_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "fotg210-hcd",
|
.name = "fotg210-hcd",
|
||||||
|
.of_match_table = of_match_ptr(fotg210_of_match),
|
||||||
},
|
},
|
||||||
.probe = fotg210_hcd_probe,
|
.probe = fotg210_hcd_probe,
|
||||||
.remove = fotg210_hcd_remove,
|
.remove = fotg210_hcd_remove,
|
||||||
|
Reference in New Issue
Block a user