what is difference between cdev_alloc and cdev_init

Viewed 6856

I'm creating a character device. I found two way to initialize char device

cdev_alloc

and

cdev_init

According to book, if i'm embedding struct cdev in my device struct then i should use cdev_init

Can any one tell me that what are difference between them?

3 Answers
Related