rtc: sysfs: fix a cast removing the const attribute

The char pointer buf_ptr is assigned an address from a const char
pointer buf (parameter of wakealarm_store).
The data pointer by buf_ptr is never modified.
So casting it to a (char *) is useless.

This patch remove this cast, and transform buf_ptr to a const char pointer.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
LABBE Corentin 2016-08-12 14:46:14 +02:00 committed by Alexandre Belloni
parent bbeb9787d9
commit 84281c2d72
1 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ wakealarm_store(struct device *dev, struct device_attribute *attr,
unsigned long push = 0;
struct rtc_wkalrm alm;
struct rtc_device *rtc = to_rtc_device(dev);
char *buf_ptr;
const char *buf_ptr;
int adjust = 0;
/* Only request alarms that trigger in the future. Disable them
@ -171,7 +171,7 @@ wakealarm_store(struct device *dev, struct device_attribute *attr,
return retval;
rtc_tm_to_time(&alm.time, &now);
buf_ptr = (char *)buf;
buf_ptr = buf;
if (*buf_ptr == '+') {
buf_ptr++;
if (*buf_ptr == '=') {