diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/media/0041-omap3-Add-function-to-register-omap3isp-platform-dev.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap/media/0041-omap3-Add-function-to-register-omap3isp-platform-dev.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/media/0041-omap3-Add-function-to-register-omap3isp-platform-dev.patch b/extras/recipes-kernel/linux/linux-omap/media/0041-omap3-Add-function-to-register-omap3isp-platform-dev.patch new file mode 100644 index 00000000..8bcbd73c --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap/media/0041-omap3-Add-function-to-register-omap3isp-platform-dev.patch | |||
@@ -0,0 +1,91 @@ | |||
1 | From d59f7c080e1c0d35a71f788350b619e76cee5033 Mon Sep 17 00:00:00 2001 | ||
2 | From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
3 | Date: Mon, 14 Dec 2009 13:09:07 +0200 | ||
4 | Subject: [PATCH 41/43] omap3: Add function to register omap3isp platform device structure | ||
5 | |||
6 | The omap3isp platform device requires platform data. Instead of | ||
7 | registering the device in omap2_init_devices(), export an | ||
8 | omap3_init_camera() function to fill the device structure with the | ||
9 | platform data pointer and register the device. | ||
10 | |||
11 | Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
12 | Acked-by: Tony Lindgren <tony@atomide.com> | ||
13 | --- | ||
14 | arch/arm/mach-omap2/devices.c | 20 +++++++++++--------- | ||
15 | arch/arm/mach-omap2/devices.h | 17 +++++++++++++++++ | ||
16 | 2 files changed, 28 insertions(+), 9 deletions(-) | ||
17 | create mode 100644 arch/arm/mach-omap2/devices.h | ||
18 | |||
19 | diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c | ||
20 | index 60cb86f..9b243be 100644 | ||
21 | --- a/arch/arm/mach-omap2/devices.c | ||
22 | +++ b/arch/arm/mach-omap2/devices.c | ||
23 | @@ -34,6 +34,8 @@ | ||
24 | #include "mux.h" | ||
25 | #include "control.h" | ||
26 | |||
27 | +#include "devices.h" | ||
28 | + | ||
29 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) | ||
30 | |||
31 | static struct resource cam_resources[] = { | ||
32 | @@ -59,8 +61,11 @@ static inline void omap_init_camera(void) | ||
33 | { | ||
34 | platform_device_register(&omap_cam_device); | ||
35 | } | ||
36 | - | ||
37 | -#elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) | ||
38 | +#else | ||
39 | +static inline void omap_init_camera(void) | ||
40 | +{ | ||
41 | +} | ||
42 | +#endif | ||
43 | |||
44 | static struct resource omap3isp_resources[] = { | ||
45 | { | ||
46 | @@ -146,15 +151,12 @@ static struct platform_device omap3isp_device = { | ||
47 | .resource = omap3isp_resources, | ||
48 | }; | ||
49 | |||
50 | -static inline void omap_init_camera(void) | ||
51 | -{ | ||
52 | - platform_device_register(&omap3isp_device); | ||
53 | -} | ||
54 | -#else | ||
55 | -static inline void omap_init_camera(void) | ||
56 | +int omap3_init_camera(void *pdata) | ||
57 | { | ||
58 | + omap3isp_device.dev.platform_data = pdata; | ||
59 | + return platform_device_register(&omap3isp_device); | ||
60 | } | ||
61 | -#endif | ||
62 | +EXPORT_SYMBOL_GPL(omap3_init_camera); | ||
63 | |||
64 | #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) | ||
65 | |||
66 | diff --git a/arch/arm/mach-omap2/devices.h b/arch/arm/mach-omap2/devices.h | ||
67 | new file mode 100644 | ||
68 | index 0000000..12ddb8a | ||
69 | --- /dev/null | ||
70 | +++ b/arch/arm/mach-omap2/devices.h | ||
71 | @@ -0,0 +1,17 @@ | ||
72 | +/* | ||
73 | + * arch/arm/mach-omap2/devices.h | ||
74 | + * | ||
75 | + * OMAP2 platform device setup/initialization | ||
76 | + * | ||
77 | + * This program is free software; you can redistribute it and/or modify | ||
78 | + * it under the terms of the GNU General Public License as published by | ||
79 | + * the Free Software Foundation; either version 2 of the License, or | ||
80 | + * (at your option) any later version. | ||
81 | + */ | ||
82 | + | ||
83 | +#ifndef __ARCH_ARM_MACH_OMAP_DEVICES_H | ||
84 | +#define __ARCH_ARM_MACH_OMAP_DEVICES_H | ||
85 | + | ||
86 | +int omap3_init_camera(void *pdata); | ||
87 | + | ||
88 | +#endif | ||
89 | -- | ||
90 | 1.6.6.1 | ||
91 | |||