Changes in uspace/drv/char/ns8250/ns8250.c [b7fd2a0:cde999a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/ns8250/ns8250.c
rb7fd2a0 rcde999a 251 251 * @return EOK on success or non-zero error code 252 252 */ 253 static errno_t ns8250_read(chardev_srv_t *srv, void *buf, size_t count, size_t *nread)253 static int ns8250_read(chardev_srv_t *srv, void *buf, size_t count, size_t *nread) 254 254 { 255 255 ns8250_t *ns = srv_ns8250(srv); … … 295 295 * @return EOK on success or non-zero error code 296 296 */ 297 static errno_t ns8250_write(chardev_srv_t *srv, const void *buf, size_t count,297 static int ns8250_write(chardev_srv_t *srv, const void *buf, size_t count, 298 298 size_t *nwritten) 299 299 { … … 309 309 } 310 310 311 static errno_t ns8250_open(chardev_srvs_t *, chardev_srv_t *);312 static errno_t ns8250_close(chardev_srv_t *);311 static int ns8250_open(chardev_srvs_t *, chardev_srv_t *); 312 static int ns8250_close(chardev_srv_t *); 313 313 static void ns8250_default_handler(chardev_srv_t *, ipc_callid_t, ipc_call_t *); 314 314 … … 324 324 static void ns8250_char_conn(ipc_callid_t, ipc_call_t *, void *); 325 325 326 static errno_t ns8250_dev_add(ddf_dev_t *dev);327 static errno_t ns8250_dev_remove(ddf_dev_t *dev);326 static int ns8250_dev_add(ddf_dev_t *dev); 327 static int ns8250_dev_remove(ddf_dev_t *dev); 328 328 329 329 /** The serial port device driver's standard operations. */ … … 407 407 * @return Zero on success, error number otherwise 408 408 */ 409 static errno_t ns8250_dev_initialize(ns8250_t *ns)410 { 411 errno_t ret = EOK;409 static int ns8250_dev_initialize(ns8250_t *ns) 410 { 411 int ret = EOK; 412 412 413 413 ddf_msg(LVL_DEBUG, "ns8250_dev_initialize %s", ddf_dev_get_name(ns->dev)); … … 501 501 * @return Zero on success, error number otherwise 502 502 */ 503 static errno_t ns8250_interrupt_enable(ns8250_t *ns)503 static int ns8250_interrupt_enable(ns8250_t *ns) 504 504 { 505 505 /* Enable interrupt using IRC service. */ 506 errno_t rc = hw_res_enable_interrupt(ns->parent_sess, ns->irq);506 int rc = hw_res_enable_interrupt(ns->parent_sess, ns->irq); 507 507 if (rc != EOK) 508 508 return EIO; … … 547 547 * if the specified baud_rate is not valid). 548 548 */ 549 static errno_t ns8250_port_set_baud_rate(ns8250_regs_t *regs, unsigned int baud_rate)549 static int ns8250_port_set_baud_rate(ns8250_regs_t *regs, unsigned int baud_rate) 550 550 { 551 551 uint16_t divisor; … … 646 646 * is invalid. 647 647 */ 648 static errno_t ns8250_port_set_com_props(ns8250_regs_t *regs, unsigned int parity,648 static int ns8250_port_set_com_props(ns8250_regs_t *regs, unsigned int parity, 649 649 unsigned int word_length, unsigned int stop_bits) 650 650 { … … 803 803 * @param ns Serial port device 804 804 */ 805 static inline errno_t ns8250_register_interrupt_handler(ns8250_t *ns,805 static inline int ns8250_register_interrupt_handler(ns8250_t *ns, 806 806 cap_handle_t *handle) 807 807 { … … 814 814 * @param ns Serial port device 815 815 */ 816 static inline errno_t ns8250_unregister_interrupt_handler(ns8250_t *ns)816 static inline int ns8250_unregister_interrupt_handler(ns8250_t *ns) 817 817 { 818 818 return unregister_interrupt_handler(ns->dev, ns->irq_cap); … … 825 825 * @param dev The serial port device. 826 826 */ 827 static errno_t ns8250_dev_add(ddf_dev_t *dev)827 static int ns8250_dev_add(ddf_dev_t *dev) 828 828 { 829 829 ns8250_t *ns = NULL; … … 831 831 bool need_cleanup = false; 832 832 bool need_unreg_intr_handler = false; 833 errno_t rc;833 int rc; 834 834 835 835 ddf_msg(LVL_DEBUG, "ns8250_dev_add %s (handle = %d)", … … 928 928 } 929 929 930 static errno_t ns8250_dev_remove(ddf_dev_t *dev)930 static int ns8250_dev_remove(ddf_dev_t *dev) 931 931 { 932 932 ns8250_t *ns = dev_ns8250(dev); 933 errno_t rc;933 int rc; 934 934 935 935 fibril_mutex_lock(&ns->mutex); … … 963 963 * @param srv Server-side connection structure 964 964 */ 965 static errno_t ns8250_open(chardev_srvs_t *srvs, chardev_srv_t *srv)965 static int ns8250_open(chardev_srvs_t *srvs, chardev_srv_t *srv) 966 966 { 967 967 ns8250_t *ns = srv_ns8250(srv); 968 errno_t res;968 int res; 969 969 970 970 fibril_mutex_lock(&ns->mutex); … … 987 987 * @param srv Server-side connection structure 988 988 */ 989 static errno_t ns8250_close(chardev_srv_t *srv)989 static int ns8250_close(chardev_srv_t *srv) 990 990 { 991 991 ns8250_t *data = srv_ns8250(srv); … … 1040 1040 * @param stop_bits The number of stop bits to be used. 1041 1041 */ 1042 static errno_t ns8250_set_props(ddf_dev_t *dev, unsigned int baud_rate,1042 static int ns8250_set_props(ddf_dev_t *dev, unsigned int baud_rate, 1043 1043 unsigned int parity, unsigned int word_length, unsigned int stop_bits) 1044 1044 { … … 1049 1049 ns8250_t *data = dev_ns8250(dev); 1050 1050 ns8250_regs_t *regs = data->regs; 1051 errno_t ret;1051 int ret; 1052 1052 1053 1053 fibril_mutex_lock(&data->mutex); … … 1072 1072 ns8250_t *ns8250 = srv_ns8250(srv); 1073 1073 sysarg_t method = IPC_GET_IMETHOD(*call); 1074 errno_t ret;1074 int ret; 1075 1075 unsigned int baud_rate, parity, word_length, stop_bits; 1076 1076
Note:
See TracChangeset
for help on using the changeset viewer.