Mercurial > pt1
comparison driver/pt1_pci.c @ 30:eb694d8e4c7e
setup owner in initialization
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sun, 01 Mar 2009 23:32:38 +0900 |
parents | 07b2fc07ff48 |
children | 289794dc265f |
comparison
equal
deleted
inserted
replaced
29:827394196b3f | 30:eb694d8e4c7e |
---|---|
658 break ; | 658 break ; |
659 } | 659 } |
660 } | 660 } |
661 for(lp = 0 ; lp < MAX_CHANNEL ; lp++){ | 661 for(lp = 0 ; lp < MAX_CHANNEL ; lp++){ |
662 cdev_init(&dev_conf->cdev[lp], &pt1_fops); | 662 cdev_init(&dev_conf->cdev[lp], &pt1_fops); |
663 dev_conf->cdev[lp].owner = THIS_MODULE; | |
663 cdev_add(&dev_conf->cdev[lp], MKDEV(MAJOR(dev_conf->dev), (MINOR(dev_conf->dev) + lp)), 1); | 664 cdev_add(&dev_conf->cdev[lp], MKDEV(MAJOR(dev_conf->dev), (MINOR(dev_conf->dev) + lp)), 1); |
664 channel = kzalloc(sizeof(PT1_CHANNEL), GFP_KERNEL); | 665 channel = kzalloc(sizeof(PT1_CHANNEL), GFP_KERNEL); |
665 if(!channel){ | 666 if(!channel){ |
666 printk(KERN_ERR "PT1:out of memory !"); | 667 printk(KERN_ERR "PT1:out of memory !"); |
667 return -ENOMEM ; | 668 return -ENOMEM ; |