diff options
author | hselasky <hselasky@FreeBSD.org> | 2012-04-02 10:50:42 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2012-04-02 10:50:42 +0000 |
commit | 126953ccbe190fe51094d1ccefda3226d1e5140c (patch) | |
tree | 70a9d586e75b3d8e087069f07020564df44b0b99 /sys/dev/usb/controller/avr32dci.c | |
parent | 56216c3bc99342baf89a814301e85dffe7a62a9b (diff) | |
download | FreeBSD-src-126953ccbe190fe51094d1ccefda3226d1e5140c.zip FreeBSD-src-126953ccbe190fe51094d1ccefda3226d1e5140c.tar.gz |
Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9.
MFC after: 1 weeks
Diffstat (limited to 'sys/dev/usb/controller/avr32dci.c')
-rw-r--r-- | sys/dev/usb/controller/avr32dci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/usb/controller/avr32dci.c b/sys/dev/usb/controller/avr32dci.c index 9494c30..9f9cd5d 100644 --- a/sys/dev/usb/controller/avr32dci.c +++ b/sys/dev/usb/controller/avr32dci.c @@ -1489,14 +1489,13 @@ static const struct avr32dci_config_desc avr32dci_confd = { }, }; +#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) } + static const struct usb_hub_descriptor_min avr32dci_hubd = { .bDescLength = sizeof(avr32dci_hubd), .bDescriptorType = UDESC_HUB, .bNbrPorts = 1, - .wHubCharacteristics[0] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) & 0xFF, - .wHubCharacteristics[1] = - (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL) >> 8, + HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)), .bPwrOn2PwrGood = 50, .bHubContrCurrent = 0, .DeviceRemovable = {0}, /* port is removable */ |