gemini: Add v4.19 kernel patches
[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 diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
16 index 058ff82ea789..6e4b40cd5916 100644
17 --- a/drivers/usb/host/fotg210-hcd.c
18 +++ b/drivers/usb/host/fotg210-hcd.c
19 @@ -10,6 +10,7 @@
20 * Most of code borrowed from the Linux-3.7 EHCI driver
21 */
22 #include <linux/module.h>
23 +#include <linux/of.h>
24 #include <linux/device.h>
25 #include <linux/dmapool.h>
26 #include <linux/kernel.h>
27 @@ -5672,9 +5673,18 @@ static int fotg210_hcd_remove(struct platform_device *pdev)
28 return 0;
29 }
30
31 +#ifdef CONFIG_OF
32 +static const struct of_device_id fotg210_of_match[] = {
33 + { .compatible = "faraday,fotg210" },
34 + {},
35 +};
36 +MODULE_DEVICE_TABLE(of, fotg210_of_match);
37 +#endif
38 +
39 static struct platform_driver fotg210_hcd_driver = {
40 .driver = {
41 .name = "fotg210-hcd",
42 + .of_match_table = of_match_ptr(fotg210_of_match),
43 },
44 .probe = fotg210_hcd_probe,
45 .remove = fotg210_hcd_remove,
46 --
47 2.19.2
48