Root/
Source at commit 554 created 13 years 7 months ago. By meklort, Grapics enabler enabled by default. removed device_numbers. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2009 Evan Lojewski. All rights reserved.␊ |
3 | *␊ |
4 | */␊ |
5 | ␊ |
6 | #include "libsaio.h"␊ |
7 | #include "modules.h"␊ |
8 | #include "pci.h"␊ |
9 | ␊ |
10 | int usb_loop();␊ |
11 | void notify_usb_dev(pci_dt_t *pci_dev);␊ |
12 | ␊ |
13 | void USBFix_pci_hook(pci_dt_t* current, void* arg2, void* arg3, void* arg4)␊ |
14 | {␊ |
15 | ␉if(current->class_id == PCI_CLASS_SERIAL_USB)␊ |
16 | ␉{␊ |
17 | ␉␉notify_usb_dev(current);␊ |
18 | ␉}␊ |
19 | }␊ |
20 | ␊ |
21 | void USBFix_start_hook(void* arg1, void* arg2, void* arg3, void* arg4)␊ |
22 | {␊ |
23 | ␉usb_loop();␊ |
24 | }␊ |
25 | ␊ |
26 | ␊ |
27 | void USBFix_start()␊ |
28 | {␊ |
29 | ␉register_hook_callback("PCIDevice", &USBFix_pci_hook);␊ |
30 | ␉register_hook_callback("Kernel Start", &USBFix_start_hook);␊ |
31 | ␊ |
32 | }␊ |
33 | ␊ |
34 |