Changeset 5159ae9 in mainline for uspace/srv
- Timestamp:
- 2010-05-29T08:37:38Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce89036b
- Parents:
- 692c40cb
- Location:
- uspace/srv/drivers
- Files:
-
- 4 edited
-
isa/isa.c (modified) (3 diffs)
-
ns8250/ns8250.c (modified) (3 diffs)
-
pciintel/pci.c (modified) (3 diffs)
-
rootia32/rootia32.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/drivers/isa/isa.c
r692c40cb r5159ae9 87 87 }; 88 88 89 static device_ class_t isa_child_class;89 static device_ops_t isa_child_dev_ops; 90 90 91 91 static int isa_add_device(device_t *dev); … … 449 449 } 450 450 451 // set a class (including the corresponding set of interfaces)to the device452 dev-> class = &isa_child_class;451 // set device operations to the device 452 dev->ops = &isa_child_dev_ops; 453 453 454 454 printf(NAME ": child_device_register(dev, parent); device is %s.\n", dev->name); … … 487 487 static void isa_init() 488 488 { 489 isa_child_class.id = 0; // TODO 490 isa_child_class.interfaces[HW_RES_DEV_IFACE] = &isa_child_res_iface; 489 isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_res_iface; 491 490 } 492 491 -
uspace/srv/drivers/ns8250/ns8250.c
r692c40cb r5159ae9 228 228 } 229 229 230 static device_ class_t ns8250_dev_class;230 static device_ops_t ns8250_dev_ops; 231 231 232 232 /** The character interface's callbacks. … … 758 758 } 759 759 760 dev->class = &ns8250_dev_class; 760 // set device operations 761 dev->ops = &ns8250_dev_ops; 761 762 762 763 add_device_to_class(dev, "serial"); … … 900 901 /** Initialize the serial port driver. 901 902 * 902 * Initialize class structures with callback methods for handling903 * Initialize device operations structures with callback methods for handling 903 904 * client requests to the serial port devices. 904 905 */ 905 906 static void ns8250_init() 906 907 { 907 // TODO 908 ns8250_dev_class.id = 0; 909 ns8250_dev_class.open = &ns8250_open; 910 ns8250_dev_class.close = &ns8250_close; 911 912 ns8250_dev_class.interfaces[CHAR_DEV_IFACE] = &ns8250_char_iface; 913 ns8250_dev_class.default_handler = &ns8250_default_handler; 908 ns8250_dev_ops.open = &ns8250_open; 909 ns8250_dev_ops.close = &ns8250_close; 910 911 ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_iface; 912 ns8250_dev_ops.default_handler = &ns8250_default_handler; 914 913 } 915 914 -
uspace/srv/drivers/pciintel/pci.c
r692c40cb r5159ae9 82 82 }; 83 83 84 static device_ class_t pci_child_class;84 static device_ops_t pci_child_ops; 85 85 86 86 … … 398 398 pci_read_interrupt(dev); 399 399 400 dev-> class = &pci_child_class;400 dev->ops = &pci_child_ops; 401 401 402 402 printf(NAME ": adding new child device %s.\n", dev->name); … … 491 491 static void pciintel_init() 492 492 { 493 pci_child_class.id = 0; // TODO 494 pci_child_class.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_res_iface; 493 pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_res_iface; 495 494 } 496 495 -
uspace/srv/drivers/rootia32/rootia32.c
r692c40cb r5159ae9 113 113 114 114 // initialized in root_ia32_init() function 115 static device_ class_t rootia32_child_class;115 static device_ops_t rootia32_child_ops; 116 116 117 117 static bool rootia32_add_child( … … 140 140 add_match_id(&child->match_ids, match_id); 141 141 142 // set class to the device143 child-> class = &rootia32_child_class;142 // set provided operations to the device 143 child->ops = &rootia32_child_ops; 144 144 145 145 // register child device … … 188 188 189 189 static void root_ia32_init() { 190 // initialize child device class 191 rootia32_child_class.id = 0; // TODO 192 rootia32_child_class.interfaces[HW_RES_DEV_IFACE] = &child_res_iface; 190 rootia32_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_res_iface; 193 191 } 194 192
Note:
See TracChangeset
for help on using the changeset viewer.
