]> git.baikalelectronics.ru Git - kernel.git/commit
isdn: eicon: Use offsetof
authorJiri Slaby <jirislaby@gmail.com>
Wed, 4 Nov 2009 16:28:12 +0000 (08:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Nov 2009 16:28:12 +0000 (08:28 -0800)
commit4a2c651e0f57f403072d93c1a2cae4a363f14a3f
tree13ce5927c8c752a279e811ec68d504246a33835e
parenta96c3fc44872431085dab30e66756d6398996914
isdn: eicon: Use offsetof

Use offsetof instead of explicit implementation.

* fixes bug with omitted & like:
  len = (byte)(((T30_INFO *) 0)->station_id + 20)

* avoids compiler warnings with wrong sizes (pointer-to-char cast):
  len = (byte)(&(((T30_INFO *) 0)->universal_6));

* cleans up the code

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Acked-by: Armin Schindler <armin@melware.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hardware/eicon/message.c