Skip to content

Commit

Permalink
mmc: bfin_sdh: fix alloc size for private data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sonic Zhang authored and Chris Ball committed Jan 26, 2011
1 parent 548f07d commit a34650f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/bfin_sdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a34650f

Please sign in to comment.