Re: [PATCH v1 01/12] gna: add driver module

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

 



Andy Shevchenko <andy.shevchenko@xxxxxxxxx> writes:

> On Tue, Feb 16, 2021 at 6:11 PM Maciej Kwapulinski
> <maciej.kwapulinski@xxxxxxxxxxxxxxx> wrote:
>>
....
>> +static int __init gna_drv_init(void)
>> +{
>> +       int ret;
>> +
>> +       mutex_init(&gna_drv_priv.lock);
>> +
>> +       gna_class = class_create(THIS_MODULE, "gna");
>> +       if (IS_ERR(gna_class)) {
>> +               pr_err("class device create failed\n");
>> +               return PTR_ERR(gna_class);
>> +       }
>> +       gna_class->devnode = gna_devnode;
>> +
>> +       ret = pci_register_driver(&gna_driver);
>
> Is it possible to decouple a PCI glue driver from the class as many
> other existing examples are doing?
>

I see many pci drivers (including staging) that do have it glued though.

Examples are:
1. "static int __init kp2000_pcie_init(void)" (commit on May 20 09:34:11
2019)
2. "static int __init hl_init(void)" (commit on Mon Feb 18 09:46:43 2019)

Please give me more details.



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux