]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
comedi: dmm32at: Add sanity check for I/O base address
authorIan Abbott <abbotti@mev.co.uk>
Fri, 30 Jan 2026 16:47:43 +0000 (16:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 13:49:38 +0000 (15:49 +0200)
commit40f86ce1d117ee8defe7fc6b54e3fb355cde25e5
treecf822efd5425601f8d5d827494de479877e28f8c
parent46fe103de0af2707381a32974407a562b4f6e85a
comedi: dmm32at: Add sanity check for I/O base address

The "dmm32at" driver uses an admin-supplied configuration option
(`it->options[0]`) to configure the I/O port base address of a
Diamond-MM-32-AT board.  It currently allows any base address to be
configured but the hardware only supports 8 possible base addresses
(selected by 3 on-board jumpers).  These are 0x100, 0x140, 0x180, 0x200,
0x280, 0x300, 0x340, and 0x380.

Add a sanity check to ensure the device is not configured at an
unsupported base address.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20260130170416.49994-19-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/comedi/drivers/dmm32at.c