diff options
author | Doug Warzecha <Douglas_Warzecha@dell.com> | 2006-03-09 17:33:35 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-09 19:47:36 -0800 |
commit | 435a80f610b2ac38a4b5334a7ae22672de3f06bd (patch) | |
tree | ddac23d1719827a21cee10d0991ed078a8825c97 /drivers/firmware | |
parent | 85a6cd03a97f04ffff7bfedfa3172894ca9a617b (diff) | |
download | kernel_samsung_smdk4412-435a80f610b2ac38a4b5334a7ae22672de3f06bd.zip kernel_samsung_smdk4412-435a80f610b2ac38a4b5334a7ae22672de3f06bd.tar.gz kernel_samsung_smdk4412-435a80f610b2ac38a4b5334a7ae22672de3f06bd.tar.bz2 |
[PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit
smi_data_buf_free() references dcdbas_pdev when calling
dma_free_coherent(). In dcdbas_exit(), smi_data_buf_free() is called after
platform_device_unregister(dcdbas_pdev).
This patch moves platform_device_unregister(dcdbas_pdev) after
smi_data_buf_free() in dcdbas_exit().
Signed-off-by: Doug Warzecha <Douglas_Warzecha@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/dcdbas.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index 8ed6ddb..4652512 100644 --- a/drivers/firmware/dcdbas.c +++ b/drivers/firmware/dcdbas.c @@ -39,7 +39,7 @@ #include "dcdbas.h" #define DRIVER_NAME "dcdbas" -#define DRIVER_VERSION "5.6.0-1" +#define DRIVER_VERSION "5.6.0-2" #define DRIVER_DESCRIPTION "Dell Systems Management Base Driver" static struct platform_device *dcdbas_pdev; @@ -581,9 +581,13 @@ static int __init dcdbas_init(void) */ static void __exit dcdbas_exit(void) { - platform_device_unregister(dcdbas_pdev); + /* + * make sure functions that use dcdbas_pdev are called + * before platform_device_unregister + */ unregister_reboot_notifier(&dcdbas_reboot_nb); smi_data_buf_free(); + platform_device_unregister(dcdbas_pdev); } module_init(dcdbas_init); |