Chameleon

Chameleon Svn Source Tree

Root/branches/slice/old749m/i386/modules/USBFix/USBFix.c

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
10int usb_loop();
11void notify_usb_dev(pci_dt_t *pci_dev);
12
13void USBFix_pci_hook(void* arg1, void* arg2, void* arg3, void* arg4)
14{
15pci_dt_t* current = arg1;
16if(current->class_id == PCI_CLASS_SERIAL_USB)
17{
18notify_usb_dev(current);
19}
20}
21
22void USBFix_start_hook(void* arg1, void* arg2, void* arg3, void* arg4)
23{
24usb_loop();
25}
26
27
28void USBFix_start()
29{
30register_hook_callback("PCIDevice", &USBFix_pci_hook);
31register_hook_callback("Kernel Start", &USBFix_start_hook);
32
33}
34
35

Archive Download this file

Revision: 1174