Re: Query regarding alloc_chrdev_region()

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

 



Hi,

> I was wondering that while using dynamic device numner allocation, can
> we ever have a scenario like following (using alloc_chrdev_region):
>
> 1) Char Driver A is hooked on Major num X, minor numbers 0-10
> 2) Char Driver B is hooked on (same) Major num X, minor numbers 11-20

So the above is actually possible?

>
> If yes, how will the userland get to know about the dynamically
> allocated range (needed to create device nodes), since /proc/devices
> only shows major numbers?

Through the exporting of this information in sysfs by using the
device_create() call that you are required to do in order to have your
device show up properly there :)

Is that taken care by cdev_add() itself?

Thanks,

Rajat
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux