staging: tidspbridge: fix incorrect free to drv_datap
authorOmar Ramirez Luna <omar.ramirez@ti.com>
Tue, 31 Jan 2012 01:20:18 +0000 (19:20 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2012 22:14:14 +0000 (14:14 -0800)
commit44c5435064b5e6182167b40a7f259969dbcaf1b8
treec01a542d1d9049b049ab7408aa907c730eafabec
parent5a63177a6967698df58c6c93d0db3a3586e0b028
staging: tidspbridge: fix incorrect free to drv_datap

This structure is still used after it has been freed, since it
is being allocated in probe, calls to free it have been moved to
module's remove routine.

This should fix the follwoing messages when attempting to remove the
module:
 drv_get_first_dev_extension: Failed to retrieve the object handle
 drv_get_first_dev_extension: Failed to retrieve the object handle
 drv_destroy: Failed to store DRV object
 mgr_destroy: Failed to store MGR object

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/tidspbridge/core/tiomap3430.c
drivers/staging/tidspbridge/rmgr/drv_interface.c