Re: API between modules

2023-05-18 Thread Greg KH
On Thu, May 18, 2023 at 08:16:18AM +0100, Lucas Tanure wrote:
> Hi,
> 
> I have two kernel modules that need to talk over an API, and right
> now, they are statically linked together, but I am looking for a
> better way to separate them and share an API between them.
> 
> A few years ago, I did the HDA component:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/sound/pci/hda/hda_component.h
> 
> Using the component API:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/include/linux/component.h
> 
> Are there other ways for a module to wait for another module to load
> and use its API?
> Is there a default way to do that?

Yes, just call a function in that other module and it will be loaded
properly before your module can call it.  That's how all in-kernel apis
work.

thanks,

greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


API between modules

2023-05-18 Thread Lucas Tanure
Hi,

I have two kernel modules that need to talk over an API, and right
now, they are statically linked together, but I am looking for a
better way to separate them and share an API between them.

A few years ago, I did the HDA component:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/sound/pci/hda/hda_component.h

Using the component API:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/include/linux/component.h

Are there other ways for a module to wait for another module to load
and use its API?
Is there a default way to do that?

I know that with MFD devices, you can have children, but that's not
the case. My modules are not related in that way.

Thanks
Lucas

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Starting to learn Linux...

2023-05-18 Thread Constantine Shulyupin
Almost complete list of Linux SW:
https://en.wikipedia.org/wiki/Category:Linux_software

On Tue, 16 May 2023 at 10:13, Deepak Goel  wrote:

> Hello
>
> I want to learn more about Linux. Is there a complete list of programs in
> Linux OS? And what do they do?
>
> Please let me know.
>
> Thank you.
>
>
> Deepak
> "The greatness of a nation can be judged by the way its animals are
> treated - Mahatma Gandhi"
>
> +91 73500 12833
> deic...@gmail.com
>
> Facebook: https://www.facebook.com/deicool
> LinkedIn: www.linkedin.com/in/deicool
>
> "Plant a Tree, Go Green"
>
> Make In India : http://www.makeinindia.com/home
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


-- 
Constantine Shulyupin
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies