aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/dev-usb.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-01-13 00:59:46 -0500
committerBen Dooks <ben-linux@fluff.org>2010-01-18 19:23:51 -0500
commitf126752043c67003de6d34b14160f87ba0323c98 (patch)
tree383f3596e6b2ed862a5eed52e560404f95aa56e9 /arch/arm/plat-samsung/dev-usb.c
parent0a6361316d6493b9dcbdda9a6a4586c3ccbfd008 (diff)
ARM: SAMSUNG: Add platform data registration for OHCI
Add a platform data helper for the OHCI device Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung/dev-usb.c')
-rw-r--r--arch/arm/plat-samsung/dev-usb.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/plat-samsung/dev-usb.c b/arch/arm/plat-samsung/dev-usb.c
index 431ae5dfd3fb..88165657fa53 100644
--- a/arch/arm/plat-samsung/dev-usb.c
+++ b/arch/arm/plat-samsung/dev-usb.c
@@ -19,7 +19,7 @@
19#include <mach/map.h> 19#include <mach/map.h>
20 20
21#include <plat/devs.h> 21#include <plat/devs.h>
22 22#include <plat/usb-control.h>
23 23
24static struct resource s3c_usb_resource[] = { 24static struct resource s3c_usb_resource[] = {
25 [0] = { 25 [0] = {
@@ -48,3 +48,22 @@ struct platform_device s3c_device_ohci = {
48}; 48};
49 49
50EXPORT_SYMBOL(s3c_device_ohci); 50EXPORT_SYMBOL(s3c_device_ohci);
51
52/**
53 * s3c_ohci_set_platdata - initialise OHCI device platform data
54 * @info: The platform data.
55 *
56 * This call copies the @info passed in and sets the device .platform_data
57 * field to that copy. The @info is copied so that the original can be marked
58 * __initdata.
59 */
60void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info)
61{
62 struct s3c2410_hcd_info *npd;
63
64 npd = kmemdup(info, sizeof(struct s3c2410_hcd_info), GFP_KERNEL);
65 if (!npd)
66 printk(KERN_ERR "%s: no memory for platform data\n", __func__);
67
68 s3c_device_ohci.dev.platform_data = npd;
69}