From d8b0e4230fc3078314cedf674a664d227cd5c0e1 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 1 Sep 2014 12:04:00 +0100 Subject: [PATCH] staging: comedi: amplc_pci230: simplify interrupt enable handling `struct pci230_private` has two members to manage the enabled interrupt sources. `int_en` is the interrupt sources we want to be enabled and `ier` is a shadow of the write-only interrupt enable register. They have the same value most of the time. They differ in the interrupt handler (`pci230_interrupt()`) itself when it temporarily clears bits in the interrupt enable register and the `ier` member in order to unlatch them in hardware, but leaves the `int_en` member alone. They also differ in `pci230_ai_stop()` and `pci230_ao_stop()` which clear bits in the `int_en` member and wait for the interrupt handler to finish before copying the value to the `ier` member and the interrupt enable register. Simplify the handling a bit, by making the `ier` member take on the role of the `int_en` member, and allowing the value to differ from the interrupt enable register while the interrupt handler is running. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed