[media] omap3isp: Fix build error in ispccdc.c
[pandora-kernel.git] / drivers / media / video / omap3isp / ispccdc.c
index 39d501b..80796eb 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
+#include <linux/slab.h>
 #include <media/v4l2-event.h>
 
 #include "isp.h"
@@ -1148,6 +1149,8 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
        omap3isp_configure_bridge(isp, ccdc->input, pdata, shift);
 
        ccdc->syncif.datsz = depth_out;
+       ccdc->syncif.hdpol = pdata ? pdata->hs_pol : 0;
+       ccdc->syncif.vdpol = pdata ? pdata->vs_pol : 0;
        ccdc_config_sync_if(ccdc, &ccdc->syncif);
 
        /* CCDC_PAD_SINK */
@@ -1691,7 +1694,7 @@ static int ccdc_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
        if (sub->type != V4L2_EVENT_OMAP3ISP_HS_VS)
                return -EINVAL;
 
-       return v4l2_event_subscribe(fh, sub);
+       return v4l2_event_subscribe(fh, sub, OMAP3ISP_CCDC_NEVENTS);
 }
 
 static int ccdc_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
@@ -2162,7 +2165,6 @@ static int ccdc_init_entities(struct isp_ccdc_device *ccdc)
        sd->grp_id = 1 << 16;   /* group ID for isp subdevs */
        v4l2_set_subdevdata(sd, ccdc);
        sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
-       sd->nevents = OMAP3ISP_CCDC_NEVENTS;
 
        pads[CCDC_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
        pads[CCDC_PAD_SOURCE_VP].flags = MEDIA_PAD_FL_SOURCE;
@@ -2257,8 +2259,6 @@ int omap3isp_ccdc_init(struct isp_device *isp)
        ccdc->syncif.fldout = 0;
        ccdc->syncif.fldpol = 0;
        ccdc->syncif.fldstat = 0;
-       ccdc->syncif.hdpol = 0;
-       ccdc->syncif.vdpol = 0;
 
        ccdc->clamp.oblen = 0;
        ccdc->clamp.dcsubval = 0;