* [PATCH] mmc: bfin_sdh: fix alloc size for private data
@ 2011-01-12 3:39 Mike Frysinger
2011-01-12 4:05 ` Chris Ball
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2011-01-12 3:39 UTC (permalink / raw)
To: linux-mmc, Chris Ball; +Cc: uclinux-dist-devel, Sonic Zhang
From: Sonic Zhang <sonic.zhang@analog.com>
The bfin_sdh driver allocates the wrong size for the private data
in the mmc_host. The first parameter of mmc_alloc_host should be
the size of the local driver struct rather than the common mmc_host.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/mmc/host/bfin_sdh.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c
index bac7d62..9193e06 100644
--- a/drivers/mmc/host/bfin_sdh.c
+++ b/drivers/mmc/host/bfin_sdh.c
@@ -462,7 +462,7 @@ static int __devinit sdh_probe(struct platform_device *pdev)
goto out;
}
- mmc = mmc_alloc_host(sizeof(*mmc), &pdev->dev);
+ mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
if (!mmc) {
ret = -ENOMEM;
goto out;
--
1.7.4.rc1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] mmc: bfin_sdh: fix alloc size for private data
2011-01-12 3:39 [PATCH] mmc: bfin_sdh: fix alloc size for private data Mike Frysinger
@ 2011-01-12 4:05 ` Chris Ball
0 siblings, 0 replies; 2+ messages in thread
From: Chris Ball @ 2011-01-12 4:05 UTC (permalink / raw)
To: Mike Frysinger; +Cc: linux-mmc, uclinux-dist-devel, Sonic Zhang
Hi Mike, Sonic,
On Tue, Jan 11, 2011 at 10:39:35PM -0500, Mike Frysinger wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> The bfin_sdh driver allocates the wrong size for the private data
> in the mmc_host. The first parameter of mmc_alloc_host should be
> the size of the local driver struct rather than the common mmc_host.
>
> - mmc = mmc_alloc_host(sizeof(*mmc), &pdev->dev);
> + mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
Thanks, I'll add a stable tag and merge as a .38 fix. Mind if we
use "mmc_alloc_host(sizeof(struct sdh_host), &pdev-dev);" instead?
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-12 4:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12 3:39 [PATCH] mmc: bfin_sdh: fix alloc size for private data Mike Frysinger
2011-01-12 4:05 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox