msm: smd_pkt: Avoid using deprecated functions
sprintf is a deprecated function and hence use snprintf.
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
diff --git a/arch/arm/mach-msm/smd_pkt.c b/arch/arm/mach-msm/smd_pkt.c
index 48ae8b4..f64fdad 100644
--- a/arch/arm/mach-msm/smd_pkt.c
+++ b/arch/arm/mach-msm/smd_pkt.c
@@ -134,7 +134,8 @@
if (smd_pkt_devp[i]->devicep == d)
break;
}
- return sprintf(buf, "%d\n", smd_pkt_devp[i]->open_modem_wait);
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+ smd_pkt_devp[i]->open_modem_wait);
}
static DEVICE_ATTR(open_timeout, 0664, open_timeout_show, open_timeout_store);