mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
coresight-tmc: Replace deprecated function
Use 'scnprintf' to replace deprecated function 'sprintf'. Change-Id: Ic258e7dfe719f1f871f9c9eb5988609a5f3b6284 Signed-off-by: Yuanfang Zhang <quic_yuanfang@quicinc.com>
This commit is contained in:
parent
c3d6993d5c
commit
bb76f075ca
1 changed files with 2 additions and 2 deletions
|
|
@ -304,7 +304,7 @@ static ssize_t trigger_cntr_show(struct device *dev,
|
|||
struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent);
|
||||
unsigned long val = drvdata->trigger_cntr;
|
||||
|
||||
return sprintf(buf, "%#lx\n", val);
|
||||
return scnprintf(buf, PAGE_SIZE, "%#lx\n", val);
|
||||
}
|
||||
|
||||
static ssize_t trigger_cntr_store(struct device *dev,
|
||||
|
|
@ -329,7 +329,7 @@ static ssize_t buffer_size_show(struct device *dev,
|
|||
{
|
||||
struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent);
|
||||
|
||||
return sprintf(buf, "%#x\n", drvdata->size);
|
||||
return scnprintf(buf, PAGE_SIZE, "%#x\n", drvdata->size);
|
||||
}
|
||||
|
||||
static ssize_t buffer_size_store(struct device *dev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue