Commit 3d0f8239 authored by Takashi Iwai's avatar Takashi Iwai Committed by John W. Linville

prism54 - Use offsetof()

Use the standard offsetof() macro to fix a compile warning below:
  CC [M]  drivers/net/wireless/prism54/isl_ioctl.o
drivers/net/wireless/prism54/isl_ioctl.c: In function 'prism2_ioctl_set_generic_element':
drivers/net/wireless/prism54/isl_ioctl.c:2658: warning: cast from pointer to integer of different size
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fb55d887
...@@ -2518,7 +2518,7 @@ enum { ...@@ -2518,7 +2518,7 @@ enum {
#define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024 #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024
#define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \
((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) offsetof(struct prism2_hostapd_param, u.generic_elem.data)
/* Maximum length for algorithm names (-1 for nul termination) /* Maximum length for algorithm names (-1 for nul termination)
* used in ioctl() */ * used in ioctl() */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment