diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c index d25e33d0835e..b3a5b1ef33d1 100644 --- a/drivers/rtc/rtc-rv3028.c +++ b/drivers/rtc/rtc-rv3028.c @@ -147,8 +147,8 @@ static ssize_t timestamp0_show(struct device *dev, if (ret) return ret; - return sprintf(buf, "%llu\n", - (unsigned long long)rtc_tm_to_time64(&tm)); + return sysfs_emit(buf, "%llu\n", + (unsigned long long)rtc_tm_to_time64(&tm)); }; static DEVICE_ATTR_RW(timestamp0); @@ -164,7 +164,7 @@ static ssize_t timestamp0_count_show(struct device *dev, if (ret) return ret; - return sprintf(buf, "%u\n", count); + return sysfs_emit(buf, "%u\n", count); }; static DEVICE_ATTR_RO(timestamp0_count);