Just use a typedef for spinlock_t, no need to create a useless
structure.
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential D45205
linuxkpi: spinlock: Simplify code manu on May 15 2024, 9:54 AM. Authored by Tags None Referenced Files
Details
Just use a typedef for spinlock_t, no need to create a useless Sponsored by: Beckhoff Automation GmbH & Co. KG
Diff Detail
Event TimelineComment Actions The main reason for this change is that now struct mtx and spinlock_t are 100% interchangeable in code which is a first step to share structures between linuxkpi driver and native ones. Comment Actions I believe this will be ABI-compatible so there should be no trouble upgrading across the commit Comment Actions Can you elaborate on this a bit? Do you have an example? Oh, not the struct mtx you mean but structures embedding struct mtx? Comment Actions Yes, I'm working on dma-buf and I want most of the code to be usable for native driver and that structures are shareable with linuxkpi drivers too so the base structure needs to be the same, the fact that I can now spin_lock(blah) if blah is struct mtx or spinlock_t helps. |