在led_ioctl中使用unsigned int cmd,做控制码,unsigned long arg作为LED序号表示,在用户空间ioctl的原型是int ioctl(int fd, unsigned long cmd, ...);后面...是可选参数,一般在驱动程序里面就是ioctl函数的最后一个参数int (*ioctl) (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);中的unsigned long arg。在驱动程序中一般是用switch(cmd)语句来实现控制。