]> err.no Git - linux-2.6/commitdiff
prism54 - Use offsetof()
authorTakashi Iwai <tiwai@suse.de>
Thu, 31 Jul 2008 17:03:10 +0000 (19:03 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 1 Aug 2008 19:31:35 +0000 (15:31 -0400)
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: Takashi Iwai <tiwai@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/prism54/isl_ioctl.c

index 97fa14e0a47912c0c8513a23dd8053b3acb649bc..3d75a7137d3cccb41f0533144c88c81a3833963a 100644 (file)
@@ -2518,7 +2518,7 @@ enum {
 
 #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024
 #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)
  * used in ioctl() */