use of dev->dev_t

Malte Vesper malte.vesper at postgrad.manchester.ac.uk
Tue Mar 17 16:43:38 EDT 2015


Hi,
I am trying to write a driver that uses the MINOR(dev_t) to identify 
cards. Since it is a PCI driver and I get pcidev->dev.dev_t anyway. I 
thought about not bothering to store the minor number of the device.
However if I look at pcidev->dev.dev_t in the remove function (the 
driver frameworks remove), I always get pcidev->dev.dev_t == 0.

Is this the intended behaviour and if so why? (This means I have to 
store the minor separatly to call device_destroy())

Thanks
Malte

FYI: I am running a 3.19.0 Kernel



More information about the Kernelnewbies mailing list