Guenter Roeck 7d520d28dd spi/mxs: Fix device remove function
The call sequence spi_alloc_master/spi_register_master/spi_unregister_master
is complete; it reduces the device reference count to zero, which results in
device memory being freed. The remove function accesses the freed memory after
the call to spi_unregister_master(), _and_ it calls spi_master_put on the freed
memory.

Acquire a reference to the SPI master device and release it after cleanup is
complete (with the existing spi_master_put) to solve the problem.

Also, the device subsystem ensures that the remove function is only called once,
and resets device driver data to NULL. Remove the unnecessaary calls to
platform_set_drvdata().

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-27 11:23:52 -07:00
..
2012-08-12 21:34:09 +03:00
2012-08-02 13:51:46 -04:00
2012-08-04 12:15:39 +04:00
2012-07-23 16:31:31 -07:00
2012-08-13 10:15:22 +05:30
2012-07-29 21:11:05 -03:00
2012-07-30 12:41:17 -07:00
2012-07-30 09:32:39 -07:00
2012-07-15 17:33:17 +01:00
2012-08-06 18:10:04 +02:00
2012-08-13 14:34:02 +08:00
2012-08-02 11:34:40 -07:00
2012-08-12 21:31:44 +03:00
2012-08-12 13:42:18 -07:00
2012-07-09 16:42:24 -04:00
2012-07-24 14:07:22 -07:00
2012-07-24 16:17:07 -07:00
2012-08-27 11:23:52 -07:00
2012-08-12 21:31:44 +03:00
2012-07-31 08:16:24 -06:00
2012-08-01 10:45:12 -07:00
2012-07-26 11:25:33 -07:00
2012-07-24 16:17:07 -07:00
2012-07-31 08:16:22 -06:00
2012-07-31 08:16:22 -06:00