RE: [PATCH 06/41] IB/hfi1: add char device instantiation code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +int __init dev_init(void)
> > +{
> > +       int ret;
> > +
> > +       ret = alloc_chrdev_region(&hfi1_dev, 0, HFI1_NMINORS,
> DRIVER_NAME);
> > +       if (ret < 0) {
> > +               pr_err("Could not allocate chrdev region (err %d)\n", -
> ret);
> > +               goto done;
> > +       }
> > +
> > +       class = class_create(THIS_MODULE, class_name());
> > +       if (IS_ERR(class)) {
> > +               ret = PTR_ERR(class);
> > +               pr_err("Could not create device class (err %d)\n", -
> ret);
> > +               unregister_chrdev_region(hfi1_dev, HFI1_NMINORS);
> > +       }
> > +
> > +done:
> > +       return ret;
> > +}
> 
> so what's the role of the char-device? 

Someone from Mike's team can chime in, but I believe this supports non-verbs interfaces (i.e. PSM), similar to what's done for qib.
��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux