linux3.0.1 内核编译失败,加了Media Controller API 出现错误
选中这个选项后make zImage就出现下面这个错误:
CC drivers/media/media-device.o
drivers/media/media-device.c: In function 'media_device_enum_entities':
drivers/media/media-device.c:110: error: 'struct media_entity' has no member named 'v4l'
drivers/media/media-device.c:111: error: 'struct media_entity' has no member named 'v4l'
make[2]: *** [drivers/media/media-device.o] 错误 1
make[1]: *** [drivers/media] 错误 2
make: *** [drivers] 错误 2
media-device.c相关源代码:
static long media_device_enum_entities(struct media_device *mdev,struct media_entity_desc __user *uent)
{
struct media_entity *ent;
struct media_entity_desc u_ent;
if (copy_from_user(&u_ent.id, &uent->id, sizeof(u_ent.id)))
return -EFAULT;
ent = find_entity(mdev, u_ent.id);
if (ent == NULL)
return -EINVAL;
u_ent.id = ent->id;
u_ent.name[0] = '\0';
if (ent->name)
strlcpy(u_ent.name, ent->name, sizeof(u_ent.name));
u_ent.type = ent->type;
u_ent.revision = ent->revision;
u_ent.flags = ent->flags;
u_ent.group_id = ent->group_id;
u_ent.pads = ent->num_pads;
u_ent.links = ent->num_links - ent->num_backlinks;
u_ent.v4l.major = ent->v4l.major;
u_ent.v4l.minor = ent->v4l.minor;
if (copy_to_user(uent, &u_ent, sizeof(u_ent)))
return -EFAULT;
return 0;
}
struct media_entity {
struct list_head list;
struct media_device *parent;/* Media device this entity belongs to*/
u32 id;/* Entity ID, unique in the parent media
* device context */
const char *name;/* Entity name */
u32 type;/* Entity type (MEDIA_ENT_T_*) */
u32 revision;/* Entity revision, driver specific */
unsigned long flags;/* Entity flags (MEDIA_ENT_FL_*) */
u32 group_id;/* Entity group ID */
u16 num_pads;/* Number of sink and source pads */
u16 num_links;/* Number of existing links, both
* enabled and disabled */
u16 num_backlinks;/* Number of backlinks */
u16 max_links;/* Maximum number of links */
struct media_pad *pads;/* Pads array (num_pads elements) */
struct media_link *links;/* Links array (max_links elements)*/
const struct media_entity_operations *ops;/* Entity operations */
/* Reference counts must never be negative, but are signed integers on
* purpose: a simple WARN_ON(<0) check can be used to detect reference
* count bugs that would make them negative.
*/
int stream_count;/* Stream count for the entity. */
int use_count;/* Use count for the entity. */
struct media_pipeline *pipe;/* Pipeline this entity belongs to. */
union {
/* Node specifications */
struct {
u32 major;
u32 minor;
} v4l;
struct {
u32 major;
u32 minor;
} fb;
struct {
u32 card;
u32 device;
u32 subdevice;
} alsa;
int dvb;
/* Sub-device specifications */
/* Nothing needed yet */
} info;
};