Hi, [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.7-rc2 next-20160609] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Helen-Koike/vimc-Virtual-Media-Controller-core-capture-and-sensor/20160531-230840 base: git://linuxtv.org/media_tree.git master config: i386-randconfig-x010-06120748 (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings (new ones prefixed by >>): In file included from include/linux/init.h:4:0, from drivers/media/platform/vimc/vimc-core.c:18: include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_format': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:774:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_mbus_framefmt, v4l2_subdev_get_try_format, try_fmt) ^~~~~~~~~~~~~~~~~~~~~~~~ include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_crop': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:775:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, v4l2_subdev_get_try_crop, try_crop) ^~~~~~~~~~~~~~~~~~~~~~~~ include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_compose': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:776:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, v4l2_subdev_get_try_compose, try_compose) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc/vimc-core.c: In function 'vimc_device_unregister': >> drivers/media/platform/vimc/vimc-core.c:308:2: error: implicit declaration of function 'media_device_cleanup' [-Werror=implicit-function-declaration] media_device_cleanup(&vimc->mdev); ^~~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc/vimc-core.c: In function 'vimc_raw_create': >> drivers/media/platform/vimc/vimc-core.c:383:45: error: 'struct v4l2_device' has no member named 'mdev'; did you mean 'dev'? ret = media_device_register_entity(v4l2_dev->mdev, ved->ent); ^~ drivers/media/platform/vimc/vimc-core.c: In function 'vimc_device_register': drivers/media/platform/vimc/vimc-core.c:423:16: error: 'struct v4l2_device' has no member named 'mdev'; did you mean 'dev'? vimc->v4l2_dev.mdev = &vimc->mdev; ^ drivers/media/platform/vimc/vimc-core.c: In function 'vimc_probe': >> drivers/media/platform/vimc/vimc-core.c:524:2: error: implicit declaration of function 'media_device_init' [-Werror=implicit-function-declaration] media_device_init(&vimc->mdev); ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mm_types.h:5, from include/media/videobuf2-core.h:15, from drivers/media/platform/vimc/vimc-capture.c:18: include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_format': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:774:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_mbus_framefmt, v4l2_subdev_get_try_format, try_fmt) ^~~~~~~~~~~~~~~~~~~~~~~~ include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_crop': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:775:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, v4l2_subdev_get_try_crop, try_crop) ^~~~~~~~~~~~~~~~~~~~~~~~ include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_compose': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:776:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, v4l2_subdev_get_try_compose, try_compose) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc/vimc-capture.c: In function 'vimc_cap_pipeline_s_stream': >> drivers/media/platform/vimc/vimc-capture.c:175:22: error: 'struct video_device' has no member named 'entity' entity = &vcap->vdev.entity; ^ In file included from include/linux/list.h:8:0, from include/linux/mm_types.h:7, from include/media/videobuf2-core.h:15, from drivers/media/platform/vimc/vimc-capture.c:18: >> include/linux/kernel.h:831:27: error: 'struct v4l2_subdev' has no member named 'entity' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ >> include/media/v4l2-subdev.h:746:2: note: in expansion of macro 'container_of' container_of(ent, struct v4l2_subdev, entity) ^~~~~~~~~~~~ >> drivers/media/platform/vimc/vimc-capture.c:186:7: note: in expansion of macro 'media_entity_to_v4l2_subdev' sd = media_entity_to_v4l2_subdev(entity); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:831:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ >> include/media/v4l2-subdev.h:746:2: note: in expansion of macro 'container_of' container_of(ent, struct v4l2_subdev, entity) ^~~~~~~~~~~~ >> drivers/media/platform/vimc/vimc-capture.c:186:7: note: in expansion of macro 'media_entity_to_v4l2_subdev' sd = media_entity_to_v4l2_subdev(entity); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/compiler.h:60:0, from include/uapi/linux/stddef.h:1, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mm_types.h:5, from include/media/videobuf2-core.h:15, from drivers/media/platform/vimc/vimc-capture.c:18: >> include/linux/compiler-gcc.h:159:2: error: 'struct v4l2_subdev' has no member named 'entity' __builtin_offsetof(a, b) ^ include/linux/stddef.h:16:32: note: in expansion of macro '__compiler_offsetof' #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:832:29: note: in expansion of macro 'offsetof' (type *)( (char *)__mptr - offsetof(type,member) );}) ^~~~~~~~ >> include/media/v4l2-subdev.h:746:2: note: in expansion of macro 'container_of' container_of(ent, struct v4l2_subdev, entity) ^~~~~~~~~~~~ >> drivers/media/platform/vimc/vimc-capture.c:186:7: note: in expansion of macro 'media_entity_to_v4l2_subdev' sd = media_entity_to_v4l2_subdev(entity); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc/vimc-capture.c: In function 'vimc_cap_start_streaming': drivers/media/platform/vimc/vimc-capture.c:204:22: error: 'struct video_device' has no member named 'entity' entity = &vcap->vdev.entity; ^ drivers/media/platform/vimc/vimc-capture.c: In function 'vimc_cap_stop_streaming': drivers/media/platform/vimc/vimc-capture.c:233:40: error: 'struct video_device' has no member named 'entity' media_entity_pipeline_stop(&vcap->vdev.entity); ^ In file included from include/linux/list.h:8:0, from include/linux/mm_types.h:7, from include/media/videobuf2-core.h:15, from drivers/media/platform/vimc/vimc-capture.c:18: drivers/media/platform/vimc/vimc-capture.c: In function 'vimc_cap_v4l2_subdev_link_validate_get_format': >> include/linux/kernel.h:831:27: error: 'struct v4l2_subdev' has no member named 'entity' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ >> include/media/v4l2-subdev.h:746:2: note: in expansion of macro 'container_of' container_of(ent, struct v4l2_subdev, entity) ^~~~~~~~~~~~ drivers/media/platform/vimc/vimc-capture.c:291:27: note: in expansion of macro 'media_entity_to_v4l2_subdev' struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(pad->entity); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:831:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ >> include/media/v4l2-subdev.h:746:2: note: in expansion of macro 'container_of' container_of(ent, struct v4l2_subdev, entity) ^~~~~~~~~~~~ drivers/media/platform/vimc/vimc-capture.c:291:27: note: in expansion of macro 'media_entity_to_v4l2_subdev' struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(pad->entity); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:831:48: note: (near initialization for 'sd') const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ >> include/media/v4l2-subdev.h:746:2: note: in expansion of macro 'container_of' container_of(ent, struct v4l2_subdev, entity) ^~~~~~~~~~~~ drivers/media/platform/vimc/vimc-capture.c:291:27: note: in expansion of macro 'media_entity_to_v4l2_subdev' struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(pad->entity); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/compiler.h:60:0, from include/uapi/linux/stddef.h:1, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mm_types.h:5, from include/media/videobuf2-core.h:15, from drivers/media/platform/vimc/vimc-capture.c:18: >> include/linux/compiler-gcc.h:159:2: error: 'struct v4l2_subdev' has no member named 'entity' __builtin_offsetof(a, b) ^ include/linux/stddef.h:16:32: note: in expansion of macro '__compiler_offsetof' #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:832:29: note: in expansion of macro 'offsetof' (type *)( (char *)__mptr - offsetof(type,member) );}) ^~~~~~~~ >> include/media/v4l2-subdev.h:746:2: note: in expansion of macro 'container_of' container_of(ent, struct v4l2_subdev, entity) ^~~~~~~~~~~~ drivers/media/platform/vimc/vimc-capture.c:291:27: note: in expansion of macro 'media_entity_to_v4l2_subdev' struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(pad->entity); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/list.h:8:0, from include/linux/mm_types.h:7, from include/media/videobuf2-core.h:15, from drivers/media/platform/vimc/vimc-capture.c:18: drivers/media/platform/vimc/vimc-capture.c: In function 'vimc_cap_link_validate': drivers/media/platform/vimc/vimc-capture.c:308:36: error: 'struct video_device' has no member named 'entity' struct vimc_cap_device, vdev.entity); ^ include/linux/kernel.h:831:29: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^~~~~~ include/linux/kernel.h:831:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ >> drivers/media/platform/vimc/vimc-capture.c:307:9: note: in expansion of macro 'container_of' vcap = container_of(link->sink->entity, ^~~~~~~~~~~~ In file included from include/linux/compiler.h:60:0, from include/uapi/linux/stddef.h:1, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mm_types.h:5, from include/media/videobuf2-core.h:15, from drivers/media/platform/vimc/vimc-capture.c:18: >> include/linux/compiler-gcc.h:159:2: error: 'struct video_device' has no member named 'entity' __builtin_offsetof(a, b) ^ include/linux/stddef.h:16:32: note: in expansion of macro '__compiler_offsetof' #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:832:29: note: in expansion of macro 'offsetof' (type *)( (char *)__mptr - offsetof(type,member) );}) ^~~~~~~~ >> drivers/media/platform/vimc/vimc-capture.c:307:9: note: in expansion of macro 'container_of' vcap = container_of(link->sink->entity, ^~~~~~~~~~~~ drivers/media/platform/vimc/vimc-capture.c: In function 'vimc_cap_create': drivers/media/platform/vimc/vimc-capture.c:450:12: error: 'struct video_device' has no member named 'entity' vcap->vdev.entity.name = name; ^ drivers/media/platform/vimc/vimc-capture.c:451:12: error: 'struct video_device' has no member named 'entity' vcap->vdev.entity.function = MEDIA_ENT_F_IO_V4L; ^ drivers/media/platform/vimc/vimc-capture.c:452:42: error: 'struct video_device' has no member named 'entity' ret = media_entity_pads_init(&vcap->vdev.entity, ^ drivers/media/platform/vimc/vimc-capture.c:500:29: error: 'struct video_device' has no member named 'entity' vcap->ved.ent = &vcap->vdev.entity; ^ drivers/media/platform/vimc/vimc-capture.c:505:6: error: 'struct video_device' has no member named 'entity' vdev->entity.ops = &vimc_cap_mops; ^~ drivers/media/platform/vimc/vimc-capture.c:529:34: error: 'struct video_device' has no member named 'entity' media_entity_cleanup(&vcap->vdev.entity); ^ cc1: some warnings being treated as errors -- In file included from include/linux/linkage.h:4:0, from include/linux/kernel.h:6, from include/linux/debug_locks.h:4, from include/linux/freezer.h:6, from drivers/media/platform/vimc/vimc-sensor.c:18: include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_format': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:774:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_mbus_framefmt, v4l2_subdev_get_try_format, try_fmt) ^~~~~~~~~~~~~~~~~~~~~~~~ include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_crop': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:775:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, v4l2_subdev_get_try_crop, try_crop) ^~~~~~~~~~~~~~~~~~~~~~~~ include/media/v4l2-subdev.h: In function 'v4l2_subdev_get_try_compose': include/media/v4l2-subdev.h:770:19: error: 'struct v4l2_subdev' has no member named 'entity' BUG_ON(pad >= sd->entity.num_pads); \ ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/media/v4l2-subdev.h:770:3: note: in expansion of macro 'BUG_ON' BUG_ON(pad >= sd->entity.num_pads); \ ^~~~~~ include/media/v4l2-subdev.h:776:1: note: in expansion of macro '__V4L2_SUBDEV_MK_GET_TRY' __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, v4l2_subdev_get_try_compose, try_compose) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc/vimc-sensor.c: In function 'vimc_sen_enum_mbus_code': >> drivers/media/platform/vimc/vimc-sensor.c:45:27: error: 'struct v4l2_subdev' has no member named 'entity' if (code->pad >= vsen->sd.entity.num_pads) ^ drivers/media/platform/vimc/vimc-sensor.c: In function 'vimc_sen_enum_frame_size': drivers/media/platform/vimc/vimc-sensor.c:60:26: error: 'struct v4l2_subdev' has no member named 'entity' if (fse->pad >= vsen->sd.entity.num_pads || ^ drivers/media/platform/vimc/vimc-sensor.c:61:16: error: 'struct v4l2_subdev' has no member named 'entity' !(vsen->sd.entity.pads[fse->pad].flags & MEDIA_PAD_FL_SOURCE)) ^ drivers/media/platform/vimc/vimc-sensor.c: At top level: >> drivers/media/platform/vimc/vimc-sensor.c:101:19: error: 'v4l2_subdev_link_validate' undeclared here (not in a function) .link_validate = v4l2_subdev_link_validate, ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/vimc/vimc-sensor.c: In function 'vimc_thread_sen': drivers/media/platform/vimc/vimc-sensor.c:119:27: error: 'struct v4l2_subdev' has no member named 'entity' for (i = 0; i < vsen->sd.entity.num_pads; i++) ^ drivers/media/platform/vimc/vimc-sensor.c:120:16: error: 'struct v4l2_subdev' has no member named 'entity' if (vsen->sd.entity.pads[i].flags & MEDIA_PAD_FL_SOURCE) ^ drivers/media/platform/vimc/vimc-sensor.c:122:21: error: 'struct v4l2_subdev' has no member named 'entity' &vsen->sd.entity.pads[i], ^ drivers/media/platform/vimc/vimc-sensor.c: In function 'vimc_sen_create': drivers/media/platform/vimc/vimc-sensor.c:230:10: error: 'struct v4l2_subdev' has no member named 'entity' vsen->sd.entity.name = name; ^ drivers/media/platform/vimc/vimc-sensor.c:231:10: error: 'struct v4l2_subdev' has no member named 'entity' vsen->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; ^ drivers/media/platform/vimc/vimc-sensor.c:232:40: error: 'struct v4l2_subdev' has no member named 'entity' ret = media_entity_pads_init(&vsen->sd.entity, ^ drivers/media/platform/vimc/vimc-sensor.c:248:27: error: 'struct v4l2_subdev' has no member named 'entity' vsen->ved.ent = &vsen->sd.entity; ^ drivers/media/platform/vimc/vimc-sensor.c:252:10: error: 'struct v4l2_subdev' has no member named 'entity' vsen->sd.entity.ops = &vimc_sen_mops; ^ drivers/media/platform/vimc/vimc-sensor.c:271:32: error: 'struct v4l2_subdev' has no member named 'entity' media_entity_cleanup(&vsen->sd.entity); ^ .. vim +/media_device_cleanup +308 drivers/media/platform/vimc/vimc-core.c 302 303 vimc->ved[i] = NULL; 304 } 305 v4l2_device_unregister(&vimc->v4l2_dev); 306 307 media_device_unregister(&vimc->mdev); > 308 media_device_cleanup(&vimc->mdev); 309 } 310 311 /* Helper function to allocate and initialize pads */ 312 struct media_pad *vimc_pads_init(u16 num_pads, const unsigned long *pads_flag) 313 { 314 unsigned int i; 315 struct media_pad *pads; 316 317 /* Allocate memory for the pads */ 318 pads = kcalloc(num_pads, sizeof(*pads), GFP_KERNEL); 319 if (!pads) 320 return ERR_PTR(-ENOMEM); 321 322 /* Initialize the pads */ 323 for (i = 0; i < num_pads; i++) { 324 pads[i].index = i; 325 pads[i].flags = pads_flag[i]; 326 } 327 328 return pads; 329 } 330 331 /* TODO: remove this function when all the 332 * entities specific code are implemented */ 333 static void vimc_raw_destroy(struct vimc_ent_device *ved) 334 { 335 media_device_unregister_entity(ved->ent); 336 337 media_entity_cleanup(ved->ent); 338 339 vimc_pads_cleanup(ved->pads); 340 341 kfree(ved->ent); 342 343 kfree(ved); 344 } 345 346 /* TODO: remove this function when all the 347 * entities specific code are implemented */ 348 static struct vimc_ent_device *vimc_raw_create(struct v4l2_device *v4l2_dev, 349 const char *const name, 350 u16 num_pads, 351 const unsigned long *pads_flag) 352 { 353 int ret; 354 struct vimc_ent_device *ved; 355 356 /* Allocate the main ved struct */ 357 ved = kzalloc(sizeof(*ved), GFP_KERNEL); 358 if (!ved) 359 return ERR_PTR(-ENOMEM); 360 361 /* Allocate the media entity */ 362 ved->ent = kzalloc(sizeof(*ved->ent), GFP_KERNEL); 363 if (!ved->ent) { 364 ret = -ENOMEM; 365 goto err_free_ved; 366 } 367 368 /* Allocate the pads */ 369 ved->pads = vimc_pads_init(num_pads, pads_flag); 370 if (IS_ERR(ved->pads)) { 371 ret = PTR_ERR(ved->pads); 372 goto err_free_ent; 373 } 374 375 /* Initialize the media entity */ 376 ved->ent->name = name; 377 ved->ent->function = MEDIA_ENT_F_IO_V4L; 378 ret = media_entity_pads_init(ved->ent, num_pads, ved->pads); 379 if (ret) 380 goto err_cleanup_pads; 381 382 /* Register the media entity */ > 383 ret = media_device_register_entity(v4l2_dev->mdev, ved->ent); 384 if (ret) 385 goto err_cleanup_entity; 386 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data