Revision e3b7fbea
b/hw/input/vmmouse.c | ||
---|---|---|
51 | 51 |
#define DPRINTF(fmt, ...) do { } while (0) |
52 | 52 |
#endif |
53 | 53 |
|
54 |
typedef struct _VMMouseState |
|
54 |
#define TYPE_VMMOUSE "vmmouse" |
|
55 |
#define VMMOUSE(obj) OBJECT_CHECK(VMMouseState, (obj), TYPE_VMMOUSE) |
|
56 |
|
|
57 |
typedef struct VMMouseState |
|
55 | 58 |
{ |
56 |
ISADevice dev; |
|
59 |
ISADevice parent_obj; |
|
60 |
|
|
57 | 61 |
uint32_t queue[VMMOUSE_QUEUE_SIZE]; |
58 | 62 |
int32_t queue_size; |
59 | 63 |
uint16_t nb_queue; |
... | ... | |
250 | 254 |
|
251 | 255 |
static void vmmouse_reset(DeviceState *d) |
252 | 256 |
{ |
253 |
VMMouseState *s = container_of(d, VMMouseState, dev.qdev);
|
|
257 |
VMMouseState *s = VMMOUSE(d);
|
|
254 | 258 |
|
255 | 259 |
s->queue_size = VMMOUSE_QUEUE_SIZE; |
256 | 260 |
|
... | ... | |
259 | 263 |
|
260 | 264 |
static int vmmouse_initfn(ISADevice *dev) |
261 | 265 |
{ |
262 |
VMMouseState *s = DO_UPCAST(VMMouseState, dev, dev);
|
|
266 |
VMMouseState *s = VMMOUSE(dev);
|
|
263 | 267 |
|
264 | 268 |
DPRINTF("vmmouse_init\n"); |
265 | 269 |
|
... | ... | |
287 | 291 |
} |
288 | 292 |
|
289 | 293 |
static const TypeInfo vmmouse_info = { |
290 |
.name = "vmmouse",
|
|
294 |
.name = TYPE_VMMOUSE,
|
|
291 | 295 |
.parent = TYPE_ISA_DEVICE, |
292 | 296 |
.instance_size = sizeof(VMMouseState), |
293 | 297 |
.class_init = vmmouse_class_initfn, |
Also available in: Unified diff