LinuxKPI: const argument to irq_set_affinity_hint()
irq_set_affinity_hint() takes a const mask argument and some drivers pass it in as such where earlier implementations were more lenient. Deal with it and __DECONST() the argument when passed to intr_setaffinity(). Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38242
This commit is contained in:
parent
bc81a2b788
commit
4c72d075a5
@ -128,12 +128,12 @@ devm_free_irq(struct device *xdev, unsigned int irq, void *p)
|
||||
}
|
||||
|
||||
static inline int
|
||||
irq_set_affinity_hint(int vector, cpumask_t *mask)
|
||||
irq_set_affinity_hint(int vector, const cpumask_t *mask)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (mask != NULL)
|
||||
error = intr_setaffinity(vector, CPU_WHICH_IRQ, mask);
|
||||
error = intr_setaffinity(vector, CPU_WHICH_IRQ, __DECONST(cpumask_t *, mask));
|
||||
else
|
||||
error = intr_setaffinity(vector, CPU_WHICH_IRQ, cpuset_root);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user