8950ef040f6738c5890746476dc8e057173fb118
[openwrt/openwrt.git] / target / linux / gemini / patches-4.19 / 0015-usb-host-fotg2-add-device-tree-probing.patch
1 From 8f45c69ba80a993a6dba2397825b27e11fa9dea7 Mon Sep 17 00:00:00 2001
2 From: Hans Ulli Kroll <ulli.kroll@googlemail.com>
3 Date: Thu, 9 Feb 2017 15:20:49 +0100
4 Subject: [PATCH 15/18] usb: host: fotg2: add device tree probing
5
6 Add device tree probing to the fotg2 driver.
7
8 Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
9 [Drop DMA mask coercion, drivers/of/platform.c does the job]
10 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 ---
12 drivers/usb/host/fotg210-hcd.c | 10 ++++++++++
13 1 file changed, 10 insertions(+)
14
15 --- a/drivers/usb/host/fotg210-hcd.c
16 +++ b/drivers/usb/host/fotg210-hcd.c
17 @@ -10,6 +10,7 @@
18 * Most of code borrowed from the Linux-3.7 EHCI driver
19 */
20 #include <linux/module.h>
21 +#include <linux/of.h>
22 #include <linux/device.h>
23 #include <linux/dmapool.h>
24 #include <linux/kernel.h>
25 @@ -5672,9 +5673,18 @@ static int fotg210_hcd_remove(struct pla
26 return 0;
27 }
28
29 +#ifdef CONFIG_OF
30 +static const struct of_device_id fotg210_of_match[] = {
31 + { .compatible = "faraday,fotg210" },
32 + {},
33 +};
34 +MODULE_DEVICE_TABLE(of, fotg210_of_match);
35 +#endif
36 +
37 static struct platform_driver fotg210_hcd_driver = {
38 .driver = {
39 .name = "fotg210-hcd",
40 + .of_match_table = of_match_ptr(fotg210_of_match),
41 },
42 .probe = fotg210_hcd_probe,
43 .remove = fotg210_hcd_remove,