Ticket #5754: pc_serial.diff
File pc_serial.diff, 2.8 KB (added by , 14 years ago) |
---|
-
src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp
diff -r a3d77690e0f3 src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp
a b 26 26 config_manager_for_driver_module_info *gConfigManagerModule = NULL; 27 27 isa_module_info *gISAModule = NULL; 28 28 pci_module_info *gPCIModule = NULL; 29 //XXX: ifndef __HAIKU__ 29 #ifdef __HAIKU__ 30 tty_module_info *gTTYModule = NULL; 31 #else 30 32 tty_module_info_v1_bone *gTTYModule = NULL; 33 #endif 31 34 struct ddomain gSerialDomain; 32 35 sem_id gDriverLock = -1; 33 36 bool gHandleISA = false; … … 730 733 status = ENOENT; 731 734 732 735 memset(&gSerialDomain, 0, sizeof(gSerialDomain)); 736 #ifndef __HAIKU__ 733 737 ddbackground(&gSerialDomain); 738 #endif 734 739 735 740 736 741 scan_bus(B_ISA_BUS); -
src/add-ons/kernel/drivers/ports/pc_serial/Driver.h
diff -r a3d77690e0f3 src/add-ons/kernel/drivers/ports/pc_serial/Driver.h
a b 191 191 extern config_manager_for_driver_module_info *gConfigManagerModule; 192 192 extern isa_module_info *gISAModule; 193 193 extern pci_module_info *gPCIModule; 194 //extern tty_module_info *gTTYModule; 194 #ifdef __HAIKU__ 195 extern tty_module_info *gTTYModule; 196 #else 195 197 extern tty_module_info_v1_bone *gTTYModule; 198 #endif 196 199 extern struct ddomain gSerialDomain; 197 200 198 201 extern "C" { … … 202 205 bool pc_serial_service(struct tty *ptty, struct ddrover *ddr, uint flags); 203 206 int32 pc_serial_interrupt(void *arg); 204 207 205 stat us_t pc_serial_open(const char *name, uint32 flags, void **cookie);206 stat us_t pc_serial_read(void *cookie, off_t position, void *buffer, size_t *numBytes);207 stat us_t pc_serial_write(void *cookie, off_t position, const void *buffer, size_t *numBytes);208 stat us_t pc_serial_control(void *cookie, uint32 op, void *arg, size_t length);209 stat us_t pc_serial_select(void *cookie, uint8 event, uint32 ref, selectsync *sync);210 stat us_t pc_serial_deselect(void *coookie, uint8 event, selectsync *sync);211 stat us_t pc_serial_close(void *cookie);212 stat us_t pc_serial_free(void *cookie);208 static status_t pc_serial_open(const char *name, uint32 flags, void **cookie); 209 static status_t pc_serial_read(void *cookie, off_t position, void *buffer, size_t *numBytes); 210 static status_t pc_serial_write(void *cookie, off_t position, const void *buffer, size_t *numBytes); 211 static status_t pc_serial_control(void *cookie, uint32 op, void *arg, size_t length); 212 static status_t pc_serial_select(void *cookie, uint8 event, uint32 ref, selectsync *sync); 213 static status_t pc_serial_deselect(void *coookie, uint8 event, selectsync *sync); 214 static status_t pc_serial_close(void *cookie); 215 static status_t pc_serial_free(void *cookie); 213 216 214 217 const char **publish_devices(); 215 218 device_hooks *find_device(const char *name);