Re: [PATCH v3 01/23] serial: omap: define and use to_uart_omap_port()

2012-08-24 Thread Tony Lindgren
* Felipe Balbi [120823 03:37]: > current code only works because struct uart_port > is the first member on the uart_omap_port structure. > > If, for whatever reason, someone puts another > member as the first of the structure, that cast > won't work anymore. In order to be safe, let's use > a con

[PATCH v3 01/23] serial: omap: define and use to_uart_omap_port()

2012-08-23 Thread Felipe Balbi
current code only works because struct uart_port is the first member on the uart_omap_port structure. If, for whatever reason, someone puts another member as the first of the structure, that cast won't work anymore. In order to be safe, let's use a container_of() which, for now, gets optimized int