mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
genirq: Move irq_set_lockdep_class() to core
irq_set_lockdep_class() is used from modules and requires irq_to_desc() to be exported. Move it into the core code which lifts another requirement for the export. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20201210194042.860029489@linutronix.de
This commit is contained in:
parent
fdd0296304
commit
f1c6306c0d
2 changed files with 18 additions and 6 deletions
|
@ -240,16 +240,14 @@ static inline bool irq_is_percpu_devid(unsigned int irq)
|
|||
return irq_check_status_bit(irq, IRQ_PER_CPU_DEVID);
|
||||
}
|
||||
|
||||
void __irq_set_lockdep_class(unsigned int irq, struct lock_class_key *lock_class,
|
||||
struct lock_class_key *request_class);
|
||||
static inline void
|
||||
irq_set_lockdep_class(unsigned int irq, struct lock_class_key *lock_class,
|
||||
struct lock_class_key *request_class)
|
||||
{
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
|
||||
if (desc) {
|
||||
lockdep_set_class(&desc->lock, lock_class);
|
||||
lockdep_set_class(&desc->request_mutex, request_class);
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_LOCKDEP))
|
||||
__irq_set_lockdep_class(irq, lock_class, request_class);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue