1.
struct v4l2_file_operations {
struct module *owner;
ssize_t (*read) (
struct file *,
char __user *, size_t, loff_t *);
ssize_t (*write) (
struct file *,
const char __user *, size_t, loff_t *);
unsigned
int (*poll) (
struct file *,
struct poll_table_struct *);
long (*ioctl) (
struct file *, unsigned
int, unsigned
long);
long (*unlocked_ioctl) (
struct file *, unsigned
int, unsigned
long);
unsigned
long (*get_unmapped_area) (
struct file *, unsigned
long,
unsigned
long, unsigned
long, unsigned
long);
int (*mmap) (
struct file *,
struct vm_area_struct *);
int (*open) (
struct file *);
int (*release) (
struct file *);
};
————————————————————————————————————
/*
* Newer version of video_device, handled by videodev2.c
* This version moves redundant code from video device code to
* the common handler
*/
struct video_device
{
/* device ops */
const struct v4l2_file_operations *fops;
/* sysfs */
struct device dev;
/* v4l device */
struct cdev *cdev;
/* character device */
/* Set either parent or v4l2_dev if your driver uses v4l2_device */
struct device *parent;
/* device parent */
struct v4l2_device *v4l2_dev;
/* v4l2_device parent */
/* device info */
char name[32];
int vfl_type;
/* 'minor' is set to -1 if the registration failed */
int minor;
u16 num;
/* use bitops to set/clear/test flags */
unsigned
long flags;
/* attribute to differentiate multiple indices on one physical device */
int index;
int debug;
/* Activates debug level*/
/* Video standard vars */
v4l2_std_id tvnorms;
/* Supported tv norms */
v4l2_std_id current_norm;
/* Current tvnorm */
/* callbacks */
void (*release)(
struct video_device *vdev);
/* ioctl callbacks */
const struct v4l2_ioctl_ops *ioctl_ops;
};
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
——————————————————————————————————————
1: struct cdev {
2: struct kobject kobj;
3: struct module *owner;
4: const struct file_operations *ops;
5: struct list_head list;
6: dev_t dev;
7: unsigned int count;
8: };
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
————————————————————————
——————————————————————————————————
1:
2: struct device {
3: struct klist klist_children;
4: struct klist_node knode_parent;
5: struct klist_node knode_driver;
6: struct klist_node knode_bus;
7: struct device * parent;
8:
9: struct kobject kobj;
10: char bus_id[BUS_ID_SIZE];
11: struct device_attribute uevent_attr;
12: struct device_attribute *devt_attr;
13:
14: struct semaphore sem;
15:
16: struct bus_type * bus;
17: struct device_driver *driver;
18: void *driver_data;
19: void *platform_data;
20: void *firmware_data;
21: struct dev_pm_info power;
22:
23: u64 *dma_mask;
24: u64 coherent_dma_mask;
25:
26: struct list_head dma_pools;
27:
28: struct dma_coherent_mem *dma_mem;
29:
30: struct list_head node;
31: struct class *class;
32: dev_t devt;
33:
34: void (*release)(struct device * dev);
35: };
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
————————————————————————————————————
1: struct kobject {
2: const char *name;
3: struct list_head entry;
4: struct kobject *parent;
5: struct kset *kset;
6: struct kobj_type *ktype;
7: struct sysfs_dirent *sd;
8: struct kref kref;
9: unsigned int state_initialized:1;
10: unsigned int state_in_sysfs:1;
11: unsigned int state_add_uevent_sent:1;
12: unsigned int state_remove_uevent_sent:1;
13: unsigned int uevent_suppress:1;
14: };
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
——————————————————————————————————
1:
2: struct kset {
3: struct subsystem * subsys;
4: struct kobj_type * ktype;
5: struct list_head list;
6: spinlock_t list_lock;
7: struct kobject kobj;
8: struct kset_uevent_ops * uevent_ops;
9: };
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
————————————————————————————————
1:
2: struct file {
3: /*
4: * fu_list becomes invalid after file_free is called and queued via
5: * fu_rcuhead for RCU freeing
6: */
7: union {
8: struct list_head fu_list;
9: struct rcu_head fu_rcuhead;
10: } f_u;
11: struct path f_path;
12: #define f_dentry f_path.dentry
13: #define f_vfsmnt f_path.mnt
14: const struct file_operations *f_op;
15: spinlock_t f_lock; /* f_ep_links, f_flags, no IRQ */
16: atomic_long_t f_count;
17: unsigned int f_flags;
18: fmode_t f_mode;
19: loff_t f_pos;
20: struct fown_struct f_owner;
21: const struct cred *f_cred;
22: struct file_ra_state f_ra;
23:
24: u64 f_version;
25: #ifdef CONFIG_SECURITY
26: void *f_security;
27: #endif
28: /* needed for tty driver, and maybe others */
29: void *private_data;
30:
31: #ifdef CONFIG_EPOLL
32: /* Used by fs/eventpoll.c to link all the hooks to this file */
33: struct list_head f_ep_links;
34: #endif /* #ifdef CONFIG_EPOLL */
35: struct address_space *f_mapping;
36: #ifdef CONFIG_DEBUG_WRITECOUNT
37: unsigned long f_mnt_write_state;
38: #endif
39: };
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
——————————————————————————————————
struct inode {
struct hlist_node i_hash;
struct list_head i_list;
/* backing dev IO list */
struct list_head i_sb_list;
struct list_head i_dentry;
unsigned
long i_ino;
atomic_t i_count;
unsigned
int i_nlink;
uid_t i_uid;
gid_t i_gid;
dev_t i_rdev;
u64 i_version;
loff_t i_size;
#ifdef __NEED_I_SIZE_ORDERED
seqcount_t i_size_seqcount;
#endif
struct timespec i_atime;
struct timespec i_mtime;
struct timespec i_ctime;
blkcnt_t i_blocks;
unsigned
int i_blkbits;
unsigned
short i_bytes;
umode_t i_mode;
spinlock_t i_lock;
/* i_blocks, i_bytes, maybe i_size */
struct mutex i_mutex;
struct rw_semaphore i_alloc_sem;
const struct inode_operations *i_op;
const struct file_operations *i_fop;
/* former ->i_op->default_file_ops */
struct super_block *i_sb;
struct file_lock *i_flock;
struct address_space *i_mapping;
struct address_space i_data;
#ifdef CONFIG_QUOTA
struct dquot *i_dquot[MAXQUOTAS];
#endif
struct list_head i_devices;
union {
struct pipe_inode_info *i_pipe;
struct block_device *i_bdev;
struct cdev *i_cdev;
};
__u32 i_generation;
#ifdef CONFIG_FSNOTIFY
__u32 i_fsnotify_mask;
/* all events this inode cares about */
struct hlist_head i_fsnotify_mark_entries;
/* fsnotify mark entries */
#endif
#ifdef CONFIG_INOTIFY
struct list_head inotify_watches;
/* watches on this inode */
struct mutex inotify_mutex;
/* protects the watches list */
#endif
unsigned
long i_state;
unsigned
long dirtied_when;
/* jiffies of first dirtying */
unsigned
int i_flags;
atomic_t i_writecount;
#ifdef CONFIG_SECURITY
void *i_security;
#endif
#ifdef CONFIG_FS_POSIX_ACL
struct posix_acl *i_acl;
struct posix_acl *i_default_acl;
#endif
void *i_private;
/* fs or device private pointer */
};
——————————————————————————————————————————————
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }