eeprom: at24: hide the read/write loop behind a macro
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 6 Jun 2016 08:48:47 +0000 (10:48 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 17 Jul 2016 17:41:54 +0000 (19:41 +0200)
commit9344a81efb885cc0d5b29dd214df66e332aa0129
treecf40b4bccc66144fbcb1d4ee7a86411aa0cf8864
parent318aa9c66b337924f96caffab689553e1875aadf
eeprom: at24: hide the read/write loop behind a macro

Before splitting the read/write routines into smaller, more
specialized functions, unduplicate some code in advance.

Use a 'for' loop instead of 'do while' when waiting for the previous
write to complete and hide it behind a macro.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/misc/eeprom/at24.c