X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/6ff8f303e69a19e1f50d4d47ee8a77b923f7977f..32049a92a5397cc9c525e1e1974d866e136f4429:/lincan/src/main.c diff --git a/lincan/src/main.c b/lincan/src/main.c index c4fb22a..92d7966 100644 --- a/lincan/src/main.c +++ b/lincan/src/main.c @@ -313,10 +313,11 @@ int init_module(void) #else /* >= 2.6.15 */ this_dev=class_device_create(can_class, NULL, MKDEV(major, dev_minor), NULL, "can%d", dev_minor); #endif /* >= 2.6.15 */ - if(!this_dev){ + if(IS_ERR(this_dev)){ CANMSG("problem to create device \"can%d\" in the class \"can\"\n", dev_minor); }else{ - this_dev->class_data=objects_p[i]; + /*this_dev->class_data=objects_p[i];*/ + class_set_devdata(this_dev,objects_p[i]); } #ifdef CONFIG_DEVFS_FS devfs_mk_cdev(MKDEV(major, dev_minor), S_IFCHR | S_IRUGO | S_IWUGO, "can%d", dev_minor);