diff --git a/examples/bh_threaded.c b/examples/bh_threaded.c index bb6a3328..998bd78b 100644 --- a/examples/bh_threaded.c +++ b/examples/bh_threaded.c @@ -171,7 +171,7 @@ static int __init bottomhalf_init(void) free_irq(button_irqs[0], &buttons[0]); fail2: - gpio_free_array(buttons, ARRAY_SIZE(leds)); + gpio_free_array(buttons, ARRAY_SIZE(buttons)); fail1: gpio_free_array(leds, ARRAY_SIZE(leds)); diff --git a/examples/bottomhalf.c b/examples/bottomhalf.c index 90f52495..88f895af 100644 --- a/examples/bottomhalf.c +++ b/examples/bottomhalf.c @@ -189,7 +189,7 @@ static int __init bottomhalf_init(void) free_irq(button_irqs[0], NULL); fail2: - gpio_free_array(buttons, ARRAY_SIZE(leds)); + gpio_free_array(buttons, ARRAY_SIZE(buttons)); fail1: gpio_free_array(leds, ARRAY_SIZE(leds)); diff --git a/examples/intrpt.c b/examples/intrpt.c index bc366e27..d78bbbd9 100644 --- a/examples/intrpt.c +++ b/examples/intrpt.c @@ -165,7 +165,7 @@ static int __init intrpt_init(void) free_irq(button_irqs[0], NULL); fail2: - gpio_free_array(buttons, ARRAY_SIZE(leds)); + gpio_free_array(buttons, ARRAY_SIZE(buttons)); fail1: gpio_free_array(leds, ARRAY_SIZE(leds)); diff --git a/lkmpg.tex b/lkmpg.tex index 7244d3ea..a9642740 100644 --- a/lkmpg.tex +++ b/lkmpg.tex @@ -1778,7 +1778,7 @@ \subsection{Spinlocks} In contrast, \cpp|spin_lock_irqsave()| disables interrupts and also saves the interrupt state, ensuring that interrupts are restored to their previous state when the lock is released. This makes \cpp|spin_lock_irqsave()| a safer option in scenarios where preserving the interrupt state is crucial. -Next, \cpp|spin_lock_bh()| disables softirqs (software interrupts) but allows hardware interrupts to continue. +Next, \cpp|spin_lock_bh()| disables \textbf{softirqs} (software interrupts) but allows hardware interrupts to continue. Unlike \cpp|spin_lock_irq()| and \cpp|spin_lock_irqsave()|, which disable both hardware and software interrupts, \cpp|spin_lock_bh()| is useful when hardware interrupts need to remain active. For more information about spinlock usage and lock types, see the following resources: