summaryrefslogtreecommitdiff
path: root/include/linux/comedi
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2023-09-13 20:07:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-05 14:34:04 +0300
commitfade5e5b0b2a2cc3855f64be6407b0bdcd837714 (patch)
tree0b56dc94c261734c78ab7302f38ea1ed50ca9529 /include/linux/comedi
parentc62f5032f72a745542aa6a7e777c7819c96adfbe (diff)
downloadlinux-fade5e5b0b2a2cc3855f64be6407b0bdcd837714.tar.xz
comedi: comedi_8254: Replace comedi_8254_init() and comedi_8254_mm_init()
`comedi_8254_init()` and `comedi_8254_mm_init()` return `NULL` on failure, but the failure is not necessarily due to lack of memory. Change them to return an `ERR_PTR` value on failure and rename the functions to make it obvious the API has changed. `comedi_8254_init()` has been replaced with `comedi_8254_io_alloc()`, and `comedi_8254_mm_init()` has been replaced with `comedi_8254_mm_alloc()`. Cc: Arnd Bergmann <arnd@kernel.org> Cc: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20230913170712.111719-4-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/comedi')
-rw-r--r--include/linux/comedi/comedi_8254.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/comedi/comedi_8254.h b/include/linux/comedi/comedi_8254.h
index 18d12321c87d..393ccb301028 100644
--- a/include/linux/comedi/comedi_8254.h
+++ b/include/linux/comedi/comedi_8254.h
@@ -136,13 +136,13 @@ void comedi_8254_set_busy(struct comedi_8254 *i8254,
void comedi_8254_subdevice_init(struct comedi_subdevice *s,
struct comedi_8254 *i8254);
-struct comedi_8254 *comedi_8254_init(unsigned long iobase,
- unsigned int osc_base,
- unsigned int iosize,
- unsigned int regshift);
-struct comedi_8254 *comedi_8254_mm_init(void __iomem *mmio,
- unsigned int osc_base,
- unsigned int iosize,
- unsigned int regshift);
+struct comedi_8254 *comedi_8254_io_alloc(unsigned long iobase,
+ unsigned int osc_base,
+ unsigned int iosize,
+ unsigned int regshift);
+struct comedi_8254 *comedi_8254_mm_alloc(void __iomem *mmio,
+ unsigned int osc_base,
+ unsigned int iosize,
+ unsigned int regshift);
#endif /* _COMEDI_8254_H */