diff options
| author | Ziqi Chen <ziqic@codeaurora.org> | 2017-08-04 17:37:33 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-08-15 22:03:41 -0700 |
| commit | 98a667af9e9eece8af41a916e6ed925fcfbd5671 (patch) | |
| tree | 0de0f32b08998c0e0fad858f1871a3bb5d5cf1d3 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | a49bb61510b938152025049730fa922c5da950a1 (diff) | |
msm: usb_bam: Fix failure of remove by of_platform_depopulate
If device is created by of_platform_populate and removed by
of_platform_depopulate from parent device driver, platform_data
will be released twice and lead to kernel panic.
of_platform_depopulate will free platform_data of each device driver.
Usually we use devm_kzalloc to malloc for platform_data so it can be
released during driver unregister. So if device is removed by
of_platform_depopulate and platform_data is malloced by devm_kzalloc,
platform_data will be freed twice. To fix it, move this data into
struct usb_bam_ctx_type and then store usb_bam_ctx_type into device
driver data. In this way, it can be get in remove function.
The member regs of usb_bam_ctx_type is not necessary. It is only
used for ioremap which already has been done by virt_addr of
struct sps_bam_props.
Without sps_deregister_bam_device, bam child device will not be
created again during defer probe. So deregister in remove function.
Change-Id: Ibae80745be5810d400a1c05566a99efcc2190020
Signed-off-by: Ziqi Chen <ziqic@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
