|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
字符设备驱动框架. e) ]5 c% \) x4 A( V0 [5 h( g
7 g: {" P0 _& U4 a( Q% E" s- Q9 C* u* Jstruct cdev //
( ]% V: e) q1 j; u8 k{
1 o$ d/ h M9 r: A* ^6 ldev t dev;, p+ u! z/ P( R; @: H. S
structfile_operations f ops;
& r1 N7 _2 P1 ^# p' I2 ^, h}: I1 ]1 p) `+ H e, ]: A
% ?+ P6 p" w( B8 X, |struct file operations! T' U) ]9 j* b3 V% `7 P% l7 f
{0 [- e! x) ?2 d% r; v. q9 i
cpen
o# q' n/ }! w5 z9 ?7 F4 a4 xread
7 D! b/ X8 L; pwrite
) O* T: [' U3 E8 W- F$ Y& d+ Y6 prelease* c5 O Q9 I% _* M2 |: i+ N
) ^2 M' C& R' ~. V' v$ h}
7 \% X6 O: Q: V/ K8 I! D9 o- W- { o* y+ m
struct inode/ E) |* l3 B! o% H6 ^
{, o" S2 p& M+ K- B4 p$ |8 i
dev_t i_rdev;
A, n o' `& D( y# m9 lstruct cdev *i_cdev;
4 y$ t4 F) e6 D7 g- s) [}
5 t2 f+ k3 C2 B+ W$ ?. d# V
) o# w' f, R$ d( fstruct file2 w7 ?# I: |! h8 B$ N7 ]) |
{
8 Q. k2 M k1 W! o; [: v2 Dvoid *private_data;
6 h v6 {, z/ {$ k6 h
" Z9 Y1 d6 H6 v# N/ {+ @}
# b( }2 U: d0 ]
. A2 i! M' y& C3 j
+ I/ D3 [- x l# t; i; j) K2 i+ g+ U7 U% \* T" X& q9 B: U
|
|