Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / drivers / media / i2c / s5k5baf.c
index 774e0d0..fc3a5a8 100644 (file)
@@ -408,7 +408,7 @@ static inline struct v4l2_subdev *ctrl_to_sd(struct v4l2_ctrl *ctrl)
 
 static inline bool s5k5baf_is_cis_subdev(struct v4l2_subdev *sd)
 {
-       return sd->entity.type == MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
+       return sd->entity.function == MEDIA_ENT_F_CAM_SENSOR;
 }
 
 static inline struct s5k5baf *to_s5k5baf(struct v4l2_subdev *sd)
@@ -1756,7 +1756,7 @@ static int s5k5baf_registered(struct v4l2_subdev *sd)
                v4l2_err(sd, "failed to register subdev %s\n",
                         state->cis_sd.name);
        else
-               ret = media_entity_create_link(&state->cis_sd.entity, PAD_CIS,
+               ret = media_create_pad_link(&state->cis_sd.entity, PAD_CIS,
                                               &state->sd.entity, PAD_CIS,
                                               MEDIA_LNK_FL_IMMUTABLE |
                                               MEDIA_LNK_FL_ENABLED);
@@ -1904,8 +1904,8 @@ static int s5k5baf_configure_subdevs(struct s5k5baf *state,
        sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
        state->cis_pad.flags = MEDIA_PAD_FL_SOURCE;
-       sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
-       ret = media_entity_init(&sd->entity, NUM_CIS_PADS, &state->cis_pad, 0);
+       sd->entity.function = MEDIA_ENT_F_CAM_SENSOR;
+       ret = media_entity_pads_init(&sd->entity, NUM_CIS_PADS, &state->cis_pad);
        if (ret < 0)
                goto err;
 
@@ -1919,8 +1919,8 @@ static int s5k5baf_configure_subdevs(struct s5k5baf *state,
 
        state->pads[PAD_CIS].flags = MEDIA_PAD_FL_SINK;
        state->pads[PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
-       sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV;
-       ret = media_entity_init(&sd->entity, NUM_ISP_PADS, state->pads, 0);
+       sd->entity.function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
+       ret = media_entity_pads_init(&sd->entity, NUM_ISP_PADS, state->pads);
 
        if (!ret)
                return 0;