diff options
| author | Ian Abbott <abbotti@mev.co.uk> | 2026-01-30 16:47:27 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-02 15:49:36 +0200 |
| commit | cb51837eeeddac2da41f4c202597c534bb9d8dc9 (patch) | |
| tree | 4e0fa21cc854fabca6c96d74a12eb44348e879d2 /tools/lib/python/kdoc | |
| parent | 241cb8dee0f83856c728f4fe2c29e331386c92f2 (diff) | |
comedi: 8255: Add some I/O base address sanity checks
The "8255" driver allows a COMEDI device to be constructed from one or
more 8255 chips, each at an I/O port base address specified by the
admin-supplied configuration options (`it->options[]`). Currently, the
driver allows any I/O base addresses to be specified as long as the I/O
regions can be reserved, and it converts the specified `int` option
values holding the base address to `unsigned long`.
It doesn't make sense to allow base addresses that are not aligned to
4-byte boundaries because the hardware register addresses would not be
decoded properly, so add a check for valid alignment.
Convert the option values that specify the base addresses from `int` to
`unsigned int` instead of `unsigned long` so they end up the same on
32-bit and 64-bit systems.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20260130170416.49994-3-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions
