Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 1 | #ifndef DEVICE_PATH_H |
| 2 | #define DEVICE_PATH_H |
| 3 | |
| 4 | enum device_path_type { |
| 5 | DEVICE_PATH_NONE = 0, |
Eric Biederman | 83b991a | 2003-10-11 06:20:25 +0000 | [diff] [blame^] | 6 | DEVICE_PATH_ROOT, |
Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 7 | DEVICE_PATH_PCI, |
| 8 | DEVICE_PATH_PNP, |
| 9 | DEVICE_PATH_I2C, |
| 10 | }; |
| 11 | |
| 12 | struct pci_path |
| 13 | { |
Eric Biederman | 83b991a | 2003-10-11 06:20:25 +0000 | [diff] [blame^] | 14 | unsigned bus; |
Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 15 | unsigned devfn; |
| 16 | }; |
| 17 | |
| 18 | struct pnp_path |
| 19 | { |
| 20 | unsigned port; |
| 21 | unsigned device; |
| 22 | }; |
| 23 | |
| 24 | struct i2c_path |
| 25 | { |
| 26 | unsigned device; |
| 27 | }; |
| 28 | |
| 29 | struct device_path { |
| 30 | enum device_path_type type; |
| 31 | union { |
| 32 | struct pci_path pci; |
| 33 | struct pnp_path pnp; |
| 34 | struct i2c_path i2c; |
| 35 | } u; |
| 36 | }; |
| 37 | |
| 38 | |
| 39 | #define DEVICE_PATH_MAX 30 |
| 40 | |
| 41 | extern int path_eq(struct device_path *path1, struct device_path *path2); |
| 42 | |
| 43 | #endif /* DEVICE_PATH_H */ |