continuing my perusal of various character drivers under
drivers/char/ to find good examples for an intro class, i notice
dsp56k.c, whose init routine contains the snippet:
= start =
if(register_chrdev(DSP56K_MAJOR, dsp56k, dsp56k_fops)) {
printk(DSP56k driver:
On Wed, 4 May 2011, Daniel Baluta wrote:
so rather than the canonical combination of cdev_init() and
cdev_add(), this appears to register the pre-defined DSP56K major
number, then goes straight to registering the driver with sysfs.
Check register_chrdev code. [1]
As you can see
On Wed, May 04, 2011 at 06:55:17AM -0400, Robert P. J. Day wrote:
so rather than the canonical combination of cdev_init() and
cdev_add(), this appears to register the pre-defined DSP56K major
number, then goes straight to registering the driver with sysfs.
is this now an alternative way