summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch')
-rw-r--r--meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch
new file mode 100644
index 0000000000..21fe7bea17
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0025-nop-usb-xceiv-behave-when-linked-as-a-module.patch
@@ -0,0 +1,90 @@
1From ae4f027580168814f734cf3c41a662a7f10c744c Mon Sep 17 00:00:00 2001
2From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
3Date: Tue, 31 Mar 2009 12:28:31 -0700
4Subject: [PATCH] nop-usb-xceiv: behave when linked as a module
5
6The NOP OTG transceiver driver needs to be usable from modules.
7Make sure its symbols are always accessible at both compile and
8link time, and make sure the device instance is allocated from
9the heap so that device lifetime rules are obeyed.
10
11Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
12---
13 drivers/usb/otg/nop-usb-xceiv.c | 25 ++++++++++---------------
14 include/linux/usb/otg.h | 4 ++--
15 2 files changed, 12 insertions(+), 17 deletions(-)
16
17diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
18index 4b933f6..9ed5ea5 100644
19--- a/drivers/usb/otg/nop-usb-xceiv.c
20+++ b/drivers/usb/otg/nop-usb-xceiv.c
21@@ -22,8 +22,8 @@
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 * Current status:
25- * this is to add "nop" transceiver for all those phy which is
26- * autonomous such as isp1504 etc.
27+ * This provides a "nop" transceiver for PHYs which are
28+ * autonomous such as isp1504, isp1707, etc.
29 */
30
31 #include <linux/module.h>
32@@ -36,30 +36,25 @@ struct nop_usb_xceiv {
33 struct device *dev;
34 };
35
36-static u64 nop_xceiv_dmamask = DMA_32BIT_MASK;
37-
38-static struct platform_device nop_xceiv_device = {
39- .name = "nop_usb_xceiv",
40- .id = -1,
41- .dev = {
42- .dma_mask = &nop_xceiv_dmamask,
43- .coherent_dma_mask = DMA_32BIT_MASK,
44- .platform_data = NULL,
45- },
46-};
47+static struct platform_device *pd;
48
49 void usb_nop_xceiv_register(void)
50 {
51- if (platform_device_register(&nop_xceiv_device) < 0) {
52+ if (pd)
53+ return;
54+ pd = platform_device_register_simple("nop_usb_xceiv", -1, NULL, 0);
55+ if (!pd) {
56 printk(KERN_ERR "Unable to register usb nop transceiver\n");
57 return;
58 }
59 }
60+EXPORT_SYMBOL(usb_nop_xceiv_register);
61
62 void usb_nop_xceiv_unregister(void)
63 {
64- platform_device_unregister(&nop_xceiv_device);
65+ platform_device_unregister(pd);
66 }
67+EXPORT_SYMBOL(usb_nop_xceiv_unregister);
68
69 static inline struct nop_usb_xceiv *xceiv_to_nop(struct otg_transceiver *x)
70 {
71diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
72index 54f2424..7df8bae 100644
73--- a/include/linux/usb/otg.h
74+++ b/include/linux/usb/otg.h
75@@ -80,10 +80,10 @@ struct otg_transceiver {
76
77 /* for board-specific init logic */
78 extern int otg_set_transceiver(struct otg_transceiver *);
79-#ifdef CONFIG_NOP_USB_XCEIV
80+
81+/* sometimes transceivers are accessed only through e.g. ULPI */
82 extern void usb_nop_xceiv_register(void);
83 extern void usb_nop_xceiv_unregister(void);
84-#endif
85
86
87 /* for usb host and peripheral controller drivers */
88--
891.6.0.4
90