]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: m48t59: clean up m48t59_nvram_read()/m48t59_nvram_write()
authorVladimir Zapolskiy <vz@mleia.com>
Wed, 5 Aug 2015 18:13:02 +0000 (21:13 +0300)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 5 Sep 2015 11:19:10 +0000 (13:19 +0200)
commitcbab19a92124c40d1bfbd6eb322cb2478ca87de6
tree1597cb6f031aea7ee7ed3a6a080f394aa6164590
parentbae0fe19c9c7f6ea82c8ef11e6a80b6c8e854c5e
rtc: m48t59: clean up m48t59_nvram_read()/m48t59_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

Spinlock acquisition/release is moved out of the loop body to get
atomic states of NVRAM reading and writing operations.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-m48t59.c