]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Introduce dsa_is_port_initialized
authorGuenter Roeck <linux@roeck-us.net>
Wed, 25 Feb 2015 07:02:02 +0000 (23:02 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Feb 2015 22:57:48 +0000 (17:57 -0500)
commited0ad765f228fd0a642a3fdaf8445b7644383d52
tree529fa340e3b007cce36bb7665f1eef4807bdb5b4
parent02d0c43cdb3b2db44d49331326fba75e92e53e92
net: dsa: Introduce dsa_is_port_initialized

To avoid race conditions when using the ds->ports[] array,
we need to check if the accessed port has been initialized.
Introduce and use helper function dsa_is_port_initialized
for that purpose and use it where needed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/dsa.c
net/dsa/slave.c