Re: /dev nodes deletion.

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

 



On Mon, Sep 21, 2009 at 6:05 PM, Ed Cashin <ecashin@xxxxxxxxxx> wrote:
> Daniel Baluta <daniel.baluta@xxxxxxxxx> writes:
>
>> Hi,
>>
>> I'm writing a character device driver which handles 2 PCI devices. I want that
>> when loading the module /dev/x0 and /dev/x1 entries to be created.
>> Also i want that when  unloading the module these entries to be deleted.
>>
>> The simplified code looks like this:
>
> You probably will reach more people by avoiding your own ad hoc
> notation for showing code.  C is a common language here.

:), ok I will follow your advice in my next posts.

>
> ...
>> @exit
>> pci_unregister_driver();
>> class_destroy(class);
>
> The aoe driver is pretty simple.  You can see what it does at unload
> for its character devices in drivers/block/aoe/aoechr.c:aoechr_exit,
> where unregister_chrdev looks relevant.

thanks I will have a look there.

>
> --
>  Ed Cashin <ecashin@xxxxxxxxxx>
>  Find experimental aoe Linux driver patches at
>  http://coraid.typepad.com/aoe_linux_proving_grounds/
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux