static int __init i2c_dev_init(void) { printk("i2c init ...\n"); int res = register_chrdev(I2C_MAJOR,"i2c",&i2cdev_fops);//注册设备号 if(res) goto out; i2c_dev_class =class_create(THIS_MODULE,"i2c-dev");//在/proc/devices下创建设备节点 if(IS_ERR(i2c_dev_cla