Commit | Line | Data |
---|---|---|
2c1a425e BS |
1 | #ifndef __NOUVEAU_IBUS_H__ |
2 | #define __NOUVEAU_IBUS_H__ | |
3 | ||
4 | #include <core/subdev.h> | |
5 | #include <core/device.h> | |
6 | ||
7 | struct nouveau_ibus { | |
8 | struct nouveau_subdev base; | |
9 | }; | |
10 | ||
11 | static inline struct nouveau_ibus * | |
12 | nouveau_ibus(void *obj) | |
13 | { | |
14 | return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_IBUS]; | |
15 | } | |
16 | ||
17 | #define nouveau_ibus_create(p,e,o,d) \ | |
18 | nouveau_subdev_create_((p), (e), (o), 0, "PIBUS", "ibus", \ | |
19 | sizeof(**d), (void **)d) | |
20 | #define nouveau_ibus_destroy(p) \ | |
21 | nouveau_subdev_destroy(&(p)->base) | |
22 | #define nouveau_ibus_init(p) \ | |
23 | nouveau_subdev_init(&(p)->base) | |
24 | #define nouveau_ibus_fini(p,s) \ | |
25 | nouveau_subdev_fini(&(p)->base, (s)) | |
26 | ||
27 | #define _nouveau_ibus_dtor _nouveau_subdev_dtor | |
28 | #define _nouveau_ibus_init _nouveau_subdev_init | |
29 | #define _nouveau_ibus_fini _nouveau_subdev_fini | |
30 | ||
31 | extern struct nouveau_oclass nve0_ibus_oclass; | |
32 | ||
33 | #endif |