File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -480,26 +480,24 @@ int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask)
480480}
481481EXPORT_SYMBOL_GPL (irq_force_affinity );
482482
483- int __irq_apply_affinity_hint (unsigned int irq , const struct cpumask * m ,
484- bool setaffinity )
483+ int __irq_apply_affinity_hint (unsigned int irq , const struct cpumask * m , bool setaffinity )
485484{
486- unsigned long flags ;
487- struct irq_desc * desc = irq_get_desc_lock (irq , & flags , IRQ_GET_DESC_CHECK_GLOBAL );
485+ int ret = - EINVAL ;
488486
489- if (!desc )
490- return - EINVAL ;
491- desc -> affinity_hint = m ;
492- irq_put_desc_unlock (desc , flags );
493- if (m && setaffinity )
487+ scoped_irqdesc_get_and_lock (irq , IRQ_GET_DESC_CHECK_GLOBAL ) {
488+ scoped_irqdesc -> affinity_hint = m ;
489+ ret = 0 ;
490+ }
491+
492+ if (!ret && m && setaffinity )
494493 __irq_set_affinity (irq , m , false);
495- return 0 ;
494+ return ret ;
496495}
497496EXPORT_SYMBOL_GPL (__irq_apply_affinity_hint );
498497
499498static void irq_affinity_notify (struct work_struct * work )
500499{
501- struct irq_affinity_notify * notify =
502- container_of (work , struct irq_affinity_notify , work );
500+ struct irq_affinity_notify * notify = container_of (work , struct irq_affinity_notify , work );
503501 struct irq_desc * desc = irq_to_desc (notify -> irq );
504502 cpumask_var_t cpumask ;
505503
You can’t perform that action at this time.
0 commit comments