summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-ds1553.c
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2015-08-05 21:12:58 +0300
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-09-05 14:19:10 +0300
commit8ccba14233000f48639aad4cab55ed7b61260db5 (patch)
tree5a4e2fed7b7eeb13d78c96aded6c4a723080a57d /drivers/rtc/rtc-ds1553.c
parentf4843b19d2c7b5effd25e2a65b487d02bf55e96f (diff)
downloadlinux-8ccba14233000f48639aad4cab55ed7b61260db5.tar.xz
rtc: ds1511: clean up ds1511_nvram_read()/ds1511_nvram_write()
The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c The change enables burst mode of access to SRAM for any read()/write() operations, it is worth to mention that this may influence on userspace, for instance prior to the change read(fd, buf, 1); read(fd, buf + 1, 1); and read(fd, buf, 2); sequences of syscalls over DS1511's sysfs "nvram" fd led to different DS1511 state changes and/or buf content, if some userspace applications are written specifically for DS1511 and exploit this strange "feature", they may be impacted. Also the change corrects NVRAM size accessible to userspace from 255 bytes to 256 bytes. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1553.c')
0 files changed, 0 insertions, 0 deletions