diff options
author | Werner Almesberger <werner@openmoko.org> | 2008-11-19 17:11:26 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:11:26 +0000 |
commit | 45f195b05adc0f0798f4920ee649f58b6ea99494 (patch) | |
tree | 6cab2dfa00145ea0082a2ed12141cb21c09c6f10 /drivers/mmc | |
parent | cf935eda7c9bea8a70466389cbee3ba7863943b5 (diff) |
s3cmci-dont-leak-pdata.patch
When compiling s3cmci as a module and doing an insmod-rmmod-insmod
sequence, s3cmci_probe often oopses because the platform data contains
garbage.
The reason for this is that I'm not providing any platform data (removed
in gta02-mmc-mci.patch), and thus s3cmci tries to put its own defaults:
if (!host->pdata) {
pdev->dev.platform_data = &s3cmci_def_pdata;
host->pdata = &s3cmci_def_pdata;
}
s3cmci_def_pdata is inside the module, so the pointer in
pdev->dev.platform_data becomes invalid after the module is unloaded.
Since nothing else in s3cmci uses pdev->dev.platform_data, "patching"
it seems unnecessary. This patch removes it.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/s3cmci.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 2bae68b4a92..a2bb2129bfd 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1280,10 +1280,8 @@ static int __devinit s3cmci_probe(struct platform_device *pdev, int is2440) host->is2440 = is2440; host->pdata = pdev->dev.platform_data; - if (!host->pdata) { - pdev->dev.platform_data = &s3cmci_def_pdata; + if (!host->pdata) host->pdata = &s3cmci_def_pdata; - } spin_lock_init(&host->complete_lock); tasklet_init(&host->pio_tasklet, pio_tasklet, (unsigned long) host); |