Changeset 1a4ea01d in mainline
- Timestamp:
- 2011-10-12T15:35:23Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 96646a6
- Parents:
- 49a98c8
- Location:
- uspace
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbflbk/main.c
r49a98c8 r1a4ea01d 46 46 * @return Error code. 47 47 */ 48 static int usbfallback_ add_device(usb_device_t *dev)48 static int usbfallback_device_add(usb_device_t *dev) 49 49 { 50 50 int rc; … … 74 74 /** USB fallback driver ops. */ 75 75 static usb_driver_ops_t usbfallback_driver_ops = { 76 . add_device = usbfallback_add_device,76 .device_add = usbfallback_device_add, 77 77 }; 78 78 -
uspace/drv/bus/usb/usbhid/main.c
r49a98c8 r1a4ea01d 150 150 * @retval EREFUSED if the device is not supported. 151 151 */ 152 static int usb_hid_ add_device(usb_device_t *dev)152 static int usb_hid_device_add(usb_device_t *dev) 153 153 { 154 usb_log_debug("usb_hid_ add_device()\n");154 usb_log_debug("usb_hid_device_add()\n"); 155 155 156 156 if (dev == NULL) { … … 185 185 * supports unplug, more callbacks will be added. */ 186 186 static usb_driver_ops_t usb_hid_driver_ops = { 187 . add_device = usb_hid_add_device,187 .device_add = usb_hid_device_add, 188 188 }; 189 189 -
uspace/drv/bus/usb/usbhub/main.c
r49a98c8 r1a4ea01d 59 59 * USB hub driver operations 60 60 * 61 * The most important one is add_device, which is set to usb_hub_add_device.61 * The most important one is device_add, which is set to usb_hub_device_add. 62 62 */ 63 63 static usb_driver_ops_t usb_hub_driver_ops = { 64 . add_device = usb_hub_add_device64 .device_add = usb_hub_device_add 65 65 }; 66 66 -
uspace/drv/bus/usb/usbhub/usbhub.c
r49a98c8 r1a4ea01d 84 84 * @return error code 85 85 */ 86 int usb_hub_ add_device(usb_device_t *usb_dev)86 int usb_hub_device_add(usb_device_t *usb_dev) 87 87 { 88 88 assert(usb_dev); -
uspace/drv/bus/usb/usbhub/usbhub.h
r49a98c8 r1a4ea01d 78 78 }; 79 79 80 int usb_hub_ add_device(usb_device_t *usb_dev);80 int usb_hub_device_add(usb_device_t *usb_dev); 81 81 82 82 bool hub_port_changes_callback(usb_device_t *dev, -
uspace/drv/bus/usb/usbmast/main.c
r49a98c8 r1a4ea01d 87 87 * @return Error code. 88 88 */ 89 static int usbmast_ add_device(usb_device_t *dev)89 static int usbmast_device_add(usb_device_t *dev) 90 90 { 91 91 int rc; … … 295 295 /** USB mass storage driver ops. */ 296 296 static usb_driver_ops_t usbmast_driver_ops = { 297 . add_device = usbmast_add_device,297 .device_add = usbmast_device_add, 298 298 }; 299 299 -
uspace/drv/bus/usb/usbmid/main.c
r49a98c8 r1a4ea01d 49 49 * @return Error code. 50 50 */ 51 static int usbmid_ add_device(usb_device_t *dev)51 static int usbmid_device_add(usb_device_t *dev) 52 52 { 53 53 usb_log_info("Taking care of new MID `%s'.\n", dev->ddf_dev->name); … … 68 68 /** USB MID driver ops. */ 69 69 static usb_driver_ops_t mid_driver_ops = { 70 . add_device = usbmid_add_device,70 .device_add = usbmid_device_add, 71 71 }; 72 72 -
uspace/drv/bus/usb/usbmouse/main.c
r49a98c8 r1a4ea01d 50 50 * 51 51 */ 52 static int usbmouse_ add_device(usb_device_t *dev)52 static int usbmouse_device_add(usb_device_t *dev) 53 53 { 54 54 int rc = usb_mouse_create(dev); … … 80 80 /** USB mouse driver ops. */ 81 81 static usb_driver_ops_t mouse_driver_ops = { 82 . add_device = usbmouse_add_device,82 .device_add = usbmouse_device_add, 83 83 }; 84 84 -
uspace/lib/usbdev/include/usb/dev/driver.h
r49a98c8 r1a4ea01d 112 112 /** USB driver ops. */ 113 113 typedef struct { 114 /** Callback when new device is about to be controlled by the driver. */115 int (* add_device)(usb_device_t *);114 /** Callback when a new device was added to the system. */ 115 int (*device_add)(usb_device_t *); 116 116 } usb_driver_ops_t; 117 117 -
uspace/lib/usbdev/src/devdrv.c
r49a98c8 r1a4ea01d 41 41 #include <assert.h> 42 42 43 static int generic_ add_device(ddf_dev_t *);43 static int generic_device_add(ddf_dev_t *); 44 44 45 45 static driver_ops_t generic_driver_ops = { 46 .add_device = generic_ add_device46 .add_device = generic_device_add 47 47 }; 48 48 static driver_t generic_driver = { … … 131 131 * @return Error code. 132 132 */ 133 int generic_ add_device(ddf_dev_t *gen_dev)133 int generic_device_add(ddf_dev_t *gen_dev) 134 134 { 135 135 assert(driver); 136 136 assert(driver->ops); 137 assert(driver->ops-> add_device);137 assert(driver->ops->device_add); 138 138 139 139 int rc; … … 148 148 } 149 149 150 return driver->ops-> add_device(dev);150 return driver->ops->device_add(dev); 151 151 } 152 152
Note:
See TracChangeset
for help on using the changeset viewer.