diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/bt-hci.c | 10 | ||||
-rw-r--r-- | hw/bt-hid.c | 9 | ||||
-rw-r--r-- | hw/bt-l2cap.c | 8 | ||||
-rw-r--r-- | hw/bt-sdp.c | 2 | ||||
-rw-r--r-- | hw/ppce500_mpc8544ds.c | 2 | ||||
-rw-r--r-- | hw/usb-bt.c | 6 | ||||
-rw-r--r-- | hw/vmware_vga.c | 11 | ||||
-rw-r--r-- | hw/wm8750.c | 4 |
8 files changed, 32 insertions, 20 deletions
diff --git a/hw/bt-hci.c b/hw/bt-hci.c index 96a5b115a0..7e93e26c8f 100644 --- a/hw/bt-hci.c +++ b/hw/bt-hci.c @@ -446,7 +446,7 @@ static inline uint8_t *bt_hci_event_start(struct bt_hci_s *hci, mask_byte = (evt - 1) >> 3; mask = 1 << ((evt - 1) & 3); if (mask & bt_event_reserved_mask[mask_byte] & ~hci->event_mask[mask_byte]) - return 0; + return NULL; packet = hci->evt_packet(hci->opaque); packet[0] = evt; @@ -664,7 +664,7 @@ static void bt_hci_lmp_link_establish(struct bt_hci_s *hci, static void bt_hci_lmp_link_teardown(struct bt_hci_s *hci, uint16_t handle) { handle &= ~HCI_HANDLE_OFFSET; - hci->lm.handle[handle].link = 0; + hci->lm.handle[handle].link = NULL; if (bt_hci_role_master(hci, handle)) { qemu_del_timer(hci->lm.handle[handle].acl_mode_timer); @@ -1138,7 +1138,7 @@ static void bt_hci_reset(struct bt_hci_s *hci) hci->device.page_scan = 0; if (hci->device.lmp_name) qemu_free((void *) hci->device.lmp_name); - hci->device.lmp_name = 0; + hci->device.lmp_name = NULL; hci->device.class[0] = 0x00; hci->device.class[1] = 0x00; hci->device.class[2] = 0x00; @@ -1617,7 +1617,7 @@ static void bt_submit_hci(struct HCIInfo *info, bt_hci_event_status(hci, HCI_SUCCESS); bt_hci_connection_accept(hci, hci->conn_req_host); - hci->conn_req_host = 0; + hci->conn_req_host = NULL; break; case cmd_opcode_pack(OGF_LINK_CTL, OCF_REJECT_CONN_REQ): @@ -1634,7 +1634,7 @@ static void bt_submit_hci(struct HCIInfo *info, bt_hci_connection_reject(hci, hci->conn_req_host, PARAM(reject_conn_req, reason)); bt_hci_connection_reject_event(hci, &hci->conn_req_host->bd_addr); - hci->conn_req_host = 0; + hci->conn_req_host = NULL; break; case cmd_opcode_pack(OGF_LINK_CTL, OCF_AUTH_REQUESTED): diff --git a/hw/bt-hid.c b/hw/bt-hid.c index 815caaf6a1..3317ecc03c 100644 --- a/hw/bt-hid.c +++ b/hw/bt-hid.c @@ -324,7 +324,8 @@ static void bt_hid_control_transaction(struct bt_hid_device_s *s, break; } s->proto = parameter; - s->usbdev->handle_control(s->usbdev, SET_PROTOCOL, s->proto, 0, 0, 0); + s->usbdev->handle_control(s->usbdev, SET_PROTOCOL, s->proto, 0, 0, + NULL); ret = BT_HS_SUCCESSFUL; break; @@ -347,7 +348,7 @@ static void bt_hid_control_transaction(struct bt_hid_device_s *s, /* We don't need to know about the Idle Rate here really, * so just pass it on to the device. */ ret = s->usbdev->handle_control(s->usbdev, - SET_IDLE, data[1], 0, 0, 0) ? + SET_IDLE, data[1], 0, 0, NULL) ? BT_HS_SUCCESSFUL : BT_HS_ERR_INVALID_PARAMETER; /* XXX: Does this generate a handshake? */ break; @@ -462,7 +463,7 @@ static void bt_hid_close_control(void *opaque) { struct bt_hid_device_s *hid = opaque; - hid->control = 0; + hid->control = NULL; bt_hid_connected_update(hid); } @@ -470,7 +471,7 @@ static void bt_hid_close_interrupt(void *opaque) { struct bt_hid_device_s *hid = opaque; - hid->interrupt = 0; + hid->interrupt = NULL; bt_hid_connected_update(hid); } diff --git a/hw/bt-l2cap.c b/hw/bt-l2cap.c index 0abcac0bc1..b22b7615ad 100644 --- a/hw/bt-l2cap.c +++ b/hw/bt-l2cap.c @@ -401,7 +401,7 @@ static inline struct bt_l2cap_psm_s *l2cap_psm( static struct l2cap_chan_s *l2cap_channel_open(struct l2cap_instance_s *l2cap, int psm, int source_cid) { - struct l2cap_chan_s *ch = 0; + struct l2cap_chan_s *ch = NULL; struct bt_l2cap_psm_s *psm_info; int result, status; int cid = l2cap_cid_new(l2cap); @@ -452,7 +452,7 @@ static struct l2cap_chan_s *l2cap_channel_open(struct l2cap_instance_s *l2cap, static void l2cap_channel_close(struct l2cap_instance_s *l2cap, int cid, int source_cid) { - struct l2cap_chan_s *ch = 0; + struct l2cap_chan_s *ch = NULL; /* According to Volume 3, section 6.1.1, pg 1048 of BT Core V2.0, a * connection in CLOSED state still responds with a L2CAP_DisconnectRsp @@ -472,7 +472,7 @@ static void l2cap_channel_close(struct l2cap_instance_s *l2cap, return; } - l2cap->cid[cid] = 0; + l2cap->cid[cid] = NULL; ch->params.close(ch->params.opaque); qemu_free(ch); @@ -484,7 +484,7 @@ static void l2cap_channel_close(struct l2cap_instance_s *l2cap, static void l2cap_channel_config_null(struct l2cap_instance_s *l2cap, struct l2cap_chan_s *ch) { - l2cap_configuration_request(l2cap, ch->remote_cid, 0, 0, 0); + l2cap_configuration_request(l2cap, ch->remote_cid, 0, NULL, 0); ch->config_req_id = l2cap->last_id; ch->config &= ~L2CAP_CFG_INIT; } diff --git a/hw/bt-sdp.c b/hw/bt-sdp.c index 9dee7c20a0..992de0efd9 100644 --- a/hw/bt-sdp.c +++ b/hw/bt-sdp.c @@ -948,7 +948,7 @@ static int bt_l2cap_sdp_new_ch(struct bt_l2cap_device_s *dev, &sdp_service_sdp_s, &sdp_service_hid_s, &sdp_service_pnp_s, - 0, + NULL, }; sdp->channel = params; diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 8fa0383c57..3d73f8a797 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -47,6 +47,7 @@ #define MPC8544_PCI_IO 0xE1000000 #define MPC8544_PCI_IOLEN 0x10000 +#ifdef HAVE_FDT static int mpc8544_copy_soc_cell(void *fdt, const char *node, const char *prop) { uint32_t cell; @@ -68,6 +69,7 @@ static int mpc8544_copy_soc_cell(void *fdt, const char *node, const char *prop) out: return ret; } +#endif static void *mpc8544_load_device_tree(void *addr, uint32_t ramsize, diff --git a/hw/usb-bt.c b/hw/usb-bt.c index 55f979e42c..53ad9a8693 100644 --- a/hw/usb-bt.c +++ b/hw/usb-bt.c @@ -612,9 +612,9 @@ static void usb_bt_handle_destroy(USBDevice *dev) { struct USBBtState *s = (struct USBBtState *) dev->opaque; - s->hci->opaque = 0; - s->hci->evt_recv = 0; - s->hci->acl_recv = 0; + s->hci->opaque = NULL; + s->hci->evt_recv = NULL; + s->hci->acl_recv = NULL; qemu_free(s); } diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index d1cba28a3f..5c271e656d 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -230,7 +230,6 @@ enum { #ifdef VERBOSE # define GUEST_OS_BASE 0x5001 static const char *vmsvga_guest_id[] = { - [0x00 ... 0x15] = "an unknown OS", [0x00] = "Dos", [0x01] = "Windows 3.1", [0x02] = "Windows 95", @@ -240,8 +239,18 @@ static const char *vmsvga_guest_id[] = { [0x06] = "Windows 2000", [0x07] = "Linux", [0x08] = "OS/2", + [0x09] = "an unknown OS", [0x0a] = "BSD", [0x0b] = "Whistler", + [0x0c] = "an unknown OS", + [0x0d] = "an unknown OS", + [0x0e] = "an unknown OS", + [0x0f] = "an unknown OS", + [0x10] = "an unknown OS", + [0x11] = "an unknown OS", + [0x12] = "an unknown OS", + [0x13] = "an unknown OS", + [0x14] = "an unknown OS", [0x15] = "Windows 2003", }; #endif diff --git a/hw/wm8750.c b/hw/wm8750.c index 93fa6d7ff6..e5324ec417 100644 --- a/hw/wm8750.c +++ b/hw/wm8750.c @@ -184,12 +184,12 @@ static void wm8750_set_format(struct wm8750_s *s) for (i = 0; i < IN_PORT_N; i ++) if (s->adc_voice[i]) { AUD_close_in(&s->card, s->adc_voice[i]); - s->adc_voice[i] = 0; + s->adc_voice[i] = NULL; } for (i = 0; i < OUT_PORT_N; i ++) if (s->dac_voice[i]) { AUD_close_out(&s->card, s->dac_voice[i]); - s->dac_voice[i] = 0; + s->dac_voice[i] = NULL; } if (!s->enable) |