Hi Felipe,

On Thursday 25 November 2010 08:02:41 Felipe Balbi wrote:
> On Thu, Nov 25, 2010 at 03:54:37AM +0100, Laurent Pinchart wrote:
> >From: Stanimir Varbanov <svarba...@mm-sol.com>
> >
> >The omap3isp platform device requires platform data. As the data can be
> >provided by a kernel module, the device can't be registered during arch
> >initialization.
> >
> >Remove the omap3isp platform device registration from
> >omap_init_camera(), and export the platform device structure to let
> >board code register/unregister it.
> 
> instead, why don't you...
> 
> >diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> >index d5da345..c2275d3 100644
> >--- a/arch/arm/mach-omap2/devices.c
> >+++ b/arch/arm/mach-omap2/devices.c
> >@@ -34,6 +34,8 @@
> >
> > #include "mux.h"
> > #include "control.h"
> >
> >+#include "devices.h"
> >+
> >
> > #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
> > 
> > static struct resource cam_resources[] = {
> >
> >@@ -144,16 +146,28 @@ static struct resource omap3isp_resources[] = {
> >
> >     }
> > 
> > };
> >
> >-static struct platform_device omap3isp_device = {
> >+static void omap3isp_release(struct device *dev)
> >+{
> >+    /* Zero the device structure to avoid re-initialization complaints from
> >+     * kobject when the device will be re-registered.
> >+     */
> >+    memset(dev, 0, sizeof(*dev));
> >+    dev->release = omap3isp_release;
> >+}
> >+
> >+struct platform_device omap3isp_device = {
> >
> >     .name           = "omap3isp",
> >     .id             = -1,
> >     .num_resources  = ARRAY_SIZE(omap3isp_resources),
> >     .resource       = omap3isp_resources,
> >
> >+    .dev = {
> >+            .release        = omap3isp_release,
> >+    },
> >
> > };
> >
> >+EXPORT_SYMBOL_GPL(omap3isp_device);
> >
> > static inline void omap_init_camera(void)
> 
> pass platform_data as an argument to this call ? Then remove the static
> inline and export this one ?

Yes indeed, why ? :-)

I guess things like that are difficult to spot when you've had your nose on 
the code for too long. Thanks for the review, I'll fix this.

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to