diff options
Diffstat (limited to 'drivers/usb/musb/musb_dsps.c')
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 444346e1e10d..ff5f112053d2 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -458,11 +458,11 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) | |||
458 | struct platform_device *musb; | 458 | struct platform_device *musb; |
459 | struct resource *res; | 459 | struct resource *res; |
460 | struct resource resources[2]; | 460 | struct resource resources[2]; |
461 | char res_name[10]; | 461 | char res_name[11]; |
462 | int ret, musbid; | 462 | int ret, musbid; |
463 | 463 | ||
464 | /* get memory resource */ | 464 | /* get memory resource */ |
465 | sprintf(res_name, "musb%d", id); | 465 | snprintf(res_name, sizeof(res_name), "musb%d", id); |
466 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name); | 466 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name); |
467 | if (!res) { | 467 | if (!res) { |
468 | dev_err(dev, "%s get mem resource failed\n", res_name); | 468 | dev_err(dev, "%s get mem resource failed\n", res_name); |
@@ -473,7 +473,7 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) | |||
473 | resources[0] = *res; | 473 | resources[0] = *res; |
474 | 474 | ||
475 | /* get irq resource */ | 475 | /* get irq resource */ |
476 | sprintf(res_name, "musb%d-irq", id); | 476 | snprintf(res_name, sizeof(res_name), "musb%d-irq", id); |
477 | res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name); | 477 | res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name); |
478 | if (!res) { | 478 | if (!res) { |
479 | dev_err(dev, "%s get irq resource failed\n", res_name); | 479 | dev_err(dev, "%s get irq resource failed\n", res_name); |
@@ -530,7 +530,7 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id) | |||
530 | 530 | ||
531 | of_property_read_u32(np, "num-eps", (u32 *)&config->num_eps); | 531 | of_property_read_u32(np, "num-eps", (u32 *)&config->num_eps); |
532 | of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits); | 532 | of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits); |
533 | sprintf(res_name, "port%d-mode", id); | 533 | snprintf(res_name, sizeof(res_name), "port%d-mode", id); |
534 | of_property_read_u32(np, res_name, (u32 *)&pdata->mode); | 534 | of_property_read_u32(np, res_name, (u32 *)&pdata->mode); |
535 | of_property_read_u32(np, "power", (u32 *)&pdata->power); | 535 | of_property_read_u32(np, "power", (u32 *)&pdata->power); |
536 | config->multipoint = of_property_read_bool(np, "multipoint"); | 536 | config->multipoint = of_property_read_bool(np, "multipoint"); |