| 130 | } |
| 131 | |
| 132 | rt_err_t serial8250_remove(struct serial8250 *serial) |
| 133 | { |
| 134 | rt_err_t err; |
| 135 | |
| 136 | rt_iounmap((void *)serial->base); |
| 137 | serial->base = RT_NULL; |
| 138 | |
| 139 | rt_pic_irq_mask(serial->irq); |
| 140 | rt_pic_detach_irq(serial->irq, serial); |
| 141 | |
| 142 | err = rt_device_unregister(&serial->parent.parent); |
| 143 | |
| 144 | if (!err && serial->remove) |
| 145 | { |
| 146 | serial->remove(serial); |
| 147 | } |
| 148 | |
| 149 | return err; |
| 150 | } |
| 151 | |
| 152 | rt_uint32_t serial8250_in(struct serial8250 *serial, int offset) |
| 153 | { |
nothing calls this directly
no test coverage detected