int leni = transfer_len;
int len = 0;
int stat = 0;
- __u32 datab[4];
- __u8 *data_buf = (__u8 *) datab;
+ union {
+ __u32 word[4];
+ __u16 hword[8];
+ __u8 byte[16];
+ } datab;
+ __u8 *data_buf = datab.byte;
__u16 bmRType_bReq;
__u16 wValue;
__u16 wIndex;
*/
case RH_GET_STATUS:
- *(__u16 *) data_buf = m16_swap(1);
+ datab.hword[0] = m16_swap(1);
OK(2);
case RH_GET_STATUS | RH_INTERFACE:
- *(__u16 *) data_buf = m16_swap(0);
+ datab.hword[0] = m16_swap(0);
OK(2);
case RH_GET_STATUS | RH_ENDPOINT:
- *(__u16 *) data_buf = m16_swap(0);
+ datab.hword[0] = m16_swap(0);
OK(2);
case RH_GET_STATUS | RH_CLASS:
- *(__u32 *) data_buf =
+ datab.word[0] =
m32_swap(RD_RH_STAT & ~(RH_HS_CRWE | RH_HS_DRWE));
OK(4);
case RH_GET_STATUS | RH_OTHER | RH_CLASS:
- *(__u32 *) data_buf = m32_swap(RD_RH_PORTSTAT);
+ datab.word[0] = m32_swap(RD_RH_PORTSTAT);
OK(4);
case RH_CLEAR_FEATURE | RH_ENDPOINT:
data_buf[3] |= 0x8;
/* corresponds to data_buf[4-7] */
- datab[1] = 0;
+ datab.word[1] = 0;
data_buf[5] = (temp & RH_A_POTPGT) >> 24;
temp = roothub_b(&gohci);
data_buf[7] = temp & RH_B_DR;