mmc: bfin_sdh: fix alloc size for private data
authorSonic Zhang <sonic.zhang@analog.com>
Wed, 12 Jan 2011 03:39:35 +0000 (22:39 -0500)
committerChris Ball <cjb@laptop.org>
Wed, 26 Jan 2011 05:28:41 +0000 (00:28 -0500)
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>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/bfin_sdh.c

index bac7d62866b731cc60e924a34521015b7c2cc288..0371bf502249baf416d78b85c88ca1ba218f28b0 100644 (file)
@@ -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(struct sdh_host), &pdev->dev);
        if (!mmc) {
                ret = -ENOMEM;
                goto out;
This page took 0.0254 seconds and 5 git commands to generate.