diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/mmc-twl4030.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index 437f52073f6e..84cac87537a3 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c | |||
@@ -59,7 +59,7 @@ static struct twl_mmc_controller { | |||
59 | struct omap_mmc_platform_data *mmc; | 59 | struct omap_mmc_platform_data *mmc; |
60 | u8 twl_vmmc_dev_grp; | 60 | u8 twl_vmmc_dev_grp; |
61 | u8 twl_mmc_dedicated; | 61 | u8 twl_mmc_dedicated; |
62 | char name[HSMMC_NAME_LEN]; | 62 | char name[HSMMC_NAME_LEN + 1]; |
63 | } hsmmc[] = { | 63 | } hsmmc[] = { |
64 | { | 64 | { |
65 | .twl_vmmc_dev_grp = VMMC1_DEV_GRP, | 65 | .twl_vmmc_dev_grp = VMMC1_DEV_GRP, |
@@ -349,7 +349,8 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
349 | return; | 349 | return; |
350 | } | 350 | } |
351 | 351 | ||
352 | sprintf(twl->name, "mmc%islot%i", c->mmc, 1); | 352 | snprintf(twl->name, ARRAY_SIZE(twl->name), "mmc%islot%i", |
353 | c->mmc, 1); | ||
353 | mmc->slots[0].name = twl->name; | 354 | mmc->slots[0].name = twl->name; |
354 | mmc->nr_slots = 1; | 355 | mmc->nr_slots = 1; |
355 | mmc->slots[0].ocr_mask = MMC_VDD_165_195 | | 356 | mmc->slots[0].ocr_mask = MMC_VDD_165_195 | |