From: Felipe Balbi Date: Thu, 23 Aug 2012 10:32:41 +0000 (+0300) Subject: serial: omap: define and use to_uart_omap_port() X-Git-Tag: omap-cleanup-sparseirq-for-v3.7~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c990f3510357586be63bbe9faf7972212a0dc78f;p=pandora-kernel.git serial: omap: define and use to_uart_omap_port() 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 into a cast anyway. Tested-by: Shubhrajyoti D Acked-by: Santosh Shilimkar Signed-off-by: Felipe Balbi Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed