驱动中如何获得次设备号


1、open 函数中:

int minor = minor(inode);

2、read / wirte 函数中:

int minor = minor(file_inode(file));

相关