Change formatting rules
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
|
||||
static atomic_int usb_ms_counter = 0;
|
||||
|
||||
static struct device* usb_ms_init (struct xhci* xhci, struct xhci_usb_device* usb_device,
|
||||
struct proc* proc, struct reschedule_ctx* rctx,
|
||||
uint64_t* lockflags) {
|
||||
static struct device* usb_ms_init(struct xhci* xhci, struct xhci_usb_device* usb_device,
|
||||
struct proc* proc, struct reschedule_ctx* rctx,
|
||||
uint64_t* lockflags) {
|
||||
static device_op_func_t ops[] = {
|
||||
[XDRV_GET_SIZE] = &usbdrv_get_size,
|
||||
[XDRV_GET_SECTOR_SIZE] = &usbdrv_get_sector_size,
|
||||
@@ -33,13 +33,13 @@ static struct device* usb_ms_init (struct xhci* xhci, struct xhci_usb_device* us
|
||||
};
|
||||
|
||||
char key[30];
|
||||
snprintf (key, sizeof (key), "usbdrv%d", atomic_fetch_add (&usb_ms_counter, 1));
|
||||
snprintf(key, sizeof(key), "usbdrv%d", atomic_fetch_add(&usb_ms_counter, 1));
|
||||
|
||||
struct device* device = device_create (DEVICE_TYPE_DRIVE, key, ops, lengthof (ops), &usbdrv_init,
|
||||
&usbdrv_fini, &init, proc, rctx);
|
||||
struct device* device = device_create(DEVICE_TYPE_DRIVE, key, ops, lengthof(ops), &usbdrv_init,
|
||||
&usbdrv_fini, &init, proc, rctx);
|
||||
|
||||
if (device != NULL)
|
||||
device_probe_partitions (proc, rctx, device);
|
||||
device_probe_partitions(proc, rctx, device);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
@@ -87,8 +87,8 @@ struct usb_driver_info {
|
||||
uint8_t if_class;
|
||||
uint8_t if_subclass;
|
||||
uint8_t if_proto;
|
||||
struct device* (*init) (struct xhci* xhci, struct xhci_usb_device* usb_device, struct proc* proc,
|
||||
struct reschedule_ctx* rctx, uint64_t* lockflags);
|
||||
struct device* (*init)(struct xhci* xhci, struct xhci_usb_device* usb_device, struct proc* proc,
|
||||
struct reschedule_ctx* rctx, uint64_t* lockflags);
|
||||
};
|
||||
|
||||
extern struct usb_driver_info usb_driver_infos[USB_DRIVER_MAX_MATCHES];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -429,14 +429,13 @@ struct xhci {
|
||||
struct list_node_link* port_changes;
|
||||
};
|
||||
|
||||
int xhci_bulk_transfer (struct xhci* xhci, struct xhci_usb_device* usb_device,
|
||||
uint8_t endpoint_addr, uintptr_t buffer_phys, size_t buffer_size,
|
||||
uint64_t* lockflags);
|
||||
int xhci_bulk_transfer(struct xhci* xhci, struct xhci_usb_device* usb_device, uint8_t endpoint_addr,
|
||||
uintptr_t buffer_phys, size_t buffer_size, uint64_t* lockflags);
|
||||
|
||||
DEFINE_DEVICE_INIT (xhci_init);
|
||||
DEFINE_DEVICE_INIT(xhci_init);
|
||||
|
||||
DEFINE_DEVICE_FINI (xhci_fini);
|
||||
DEFINE_DEVICE_FINI(xhci_fini);
|
||||
|
||||
DEFINE_DEVICE_OP (xhci_poll_driver);
|
||||
DEFINE_DEVICE_OP(xhci_poll_driver);
|
||||
|
||||
#endif // _KERNEL_DEVICE_XHCI_H
|
||||
|
||||
Reference in New Issue
Block a user