package: fix insmod on install
[openwrt.git] / target / linux / ramips / patches-3.8 / 0203-owrt-OF-USB-add-OF-binding-for-ehci-and-ohci-platfor.patch
1 From 3c99a50d689cb4811b13b9810d18c9316587216f Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Mon, 18 Mar 2013 20:51:21 +0100
4 Subject: [PATCH 203/208] owrt: OF: USB: add OF binding for ehci and ohci
5  platform driver
6
7 Make ohci-platform and ehci-platform loadable from OF.
8
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 ---
11  drivers/usb/host/ehci-platform.c |    7 +++++++
12  drivers/usb/host/ohci-platform.c |    7 +++++++
13  2 files changed, 14 insertions(+)
14
15 --- a/drivers/usb/host/ehci-platform.c
16 +++ b/drivers/usb/host/ehci-platform.c
17 @@ -183,6 +183,12 @@ static int ehci_platform_resume(struct d
18  #define ehci_platform_resume   NULL
19  #endif /* CONFIG_PM */
20  
21 +static const struct of_device_id ehci_match_table[] = {
22 +       { .compatible = "ehci-platform" },
23 +       {},
24 +};
25 +MODULE_DEVICE_TABLE(of, ehci_match_table);
26 +
27  static const struct platform_device_id ehci_platform_table[] = {
28         { "ehci-platform", 0 },
29         { }
30 @@ -203,6 +209,7 @@ static struct platform_driver ehci_platf
31                 .owner  = THIS_MODULE,
32                 .name   = "ehci-platform",
33                 .pm     = &ehci_platform_pm_ops,
34 +               .of_match_table = ehci_match_table,
35         }
36  };
37  
38 --- a/drivers/usb/host/ohci-platform.c
39 +++ b/drivers/usb/host/ohci-platform.c
40 @@ -200,6 +200,12 @@ static int ohci_platform_resume(struct d
41  #define ohci_platform_resume   NULL
42  #endif /* CONFIG_PM */
43  
44 +static const struct of_device_id ohci_match_table[] = {
45 +       { .compatible = "ohci-platform" },
46 +       {},
47 +};
48 +MODULE_DEVICE_TABLE(of, ohci_match_table);
49 +
50  static const struct platform_device_id ohci_platform_table[] = {
51         { "ohci-platform", 0 },
52         { }
53 @@ -220,5 +226,6 @@ static struct platform_driver ohci_platf
54                 .owner  = THIS_MODULE,
55                 .name   = "ohci-platform",
56                 .pm     = &ohci_platform_pm_ops,
57 +               .of_match_table = ohci_match_table,
58         }
59  };