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)
480
480
}
481
481
EXPORT_SYMBOL_GPL (irq_force_affinity );
482
482
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 )
485
484
{
486
- unsigned long flags ;
487
- struct irq_desc * desc = irq_get_desc_lock (irq , & flags , IRQ_GET_DESC_CHECK_GLOBAL );
485
+ int ret = - EINVAL ;
488
486
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 )
494
493
__irq_set_affinity (irq , m , false);
495
- return 0 ;
494
+ return ret ;
496
495
}
497
496
EXPORT_SYMBOL_GPL (__irq_apply_affinity_hint );
498
497
499
498
static void irq_affinity_notify (struct work_struct * work )
500
499
{
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 );
503
501
struct irq_desc * desc = irq_to_desc (notify -> irq );
504
502
cpumask_var_t cpumask ;
505
503
You can’t perform that action at this time.
0 commit comments