Revision 11c7549d hw/audio/gus.c
b/hw/audio/gus.c | ||
---|---|---|
46 | 46 |
#define IO_WRITE_PROTO(name) \ |
47 | 47 |
static void name (void *opaque, uint32_t nport, uint32_t val) |
48 | 48 |
|
49 |
#define TYPE_GUS "gus" |
|
50 |
#define GUS(obj) OBJECT_CHECK (GUSState, (obj), TYPE_GUS) |
|
51 |
|
|
49 | 52 |
typedef struct GUSState { |
50 | 53 |
ISADevice dev; |
51 | 54 |
GUSEmuState emu; |
... | ... | |
250 | 253 |
|
251 | 254 |
static int gus_initfn (ISADevice *dev) |
252 | 255 |
{ |
253 |
GUSState *s = DO_UPCAST (GUSState, dev, dev);
|
|
256 |
GUSState *s = GUS (dev);
|
|
254 | 257 |
struct audsettings as; |
255 | 258 |
|
256 | 259 |
AUD_register_card ("gus", &s->card); |
... | ... | |
295 | 298 |
|
296 | 299 |
static int GUS_init (ISABus *bus) |
297 | 300 |
{ |
298 |
isa_create_simple (bus, "gus");
|
|
301 |
isa_create_simple (bus, TYPE_GUS);
|
|
299 | 302 |
return 0; |
300 | 303 |
} |
301 | 304 |
|
... | ... | |
318 | 321 |
} |
319 | 322 |
|
320 | 323 |
static const TypeInfo gus_info = { |
321 |
.name = "gus",
|
|
324 |
.name = TYPE_GUS,
|
|
322 | 325 |
.parent = TYPE_ISA_DEVICE, |
323 | 326 |
.instance_size = sizeof (GUSState), |
324 | 327 |
.class_init = gus_class_initfn, |
Also available in: Unified diff