OSDN Git Service

staging: wilc1000: avoid use of 'g_spi' static variable
authorAjay Singh <ajay.kathat@microchip.com>
Tue, 25 Sep 2018 06:23:37 +0000 (11:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Sep 2018 18:53:57 +0000 (20:53 +0200)
commit110f4b755e5df82fa4fe54612552dddfe9d58ad5
tree87c2f30438238bc4fc14a0f01f34aa10ca7aa64d
parent97eaff578bf79e41d7efa50046ba2acc95ac4cd2
staging: wilc1000: avoid use of 'g_spi' static variable

Instead of using static variable 'g_spi' move it as part of 'wilc'
struct. Also allocating the memory in the probe function and
free is taken care in wilc_netdev_cleanup().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_spi.c