-
- Downloads
counter: Return error code on invalid modes
Only a select set of modes (function, action, etc.) are valid for a given device configuration. This patch ensures that invalid modes result in a return -EINVAL. Such a situation should never occur in reality, but it's good to define a default switch case for the sake of making the intent of the code clear. Cc: Kamel Bouhara <kamel.bouhara@bootlin.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Acked-by:David Lechner <david@lechnology.com> Acked-by:
Syed Nayyar Waris <syednwaris@gmail.com> Reviewed-by:
Fabrice Gasnier <fabrice.gasnier@foss.st.com> Signed-off-by:
William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/7af82d4e39610da11edce0ee370285fe1cb1eac8.1627990337.git.vilhelm.gray@gmail.com Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
- drivers/counter/104-quad-8.c 14 additions, 6 deletionsdrivers/counter/104-quad-8.c
- drivers/counter/microchip-tcb-capture.c 6 additions, 0 deletionsdrivers/counter/microchip-tcb-capture.c
- drivers/counter/stm32-lptimer-cnt.c 6 additions, 4 deletionsdrivers/counter/stm32-lptimer-cnt.c
- drivers/counter/ti-eqep.c 16 additions, 11 deletionsdrivers/counter/ti-eqep.c
Loading
Please register or sign in to comment