Lines Matching refs:count
48 static inline size_t w1_f2d_fix_count(loff_t off, size_t count, size_t size) in w1_f2d_fix_count() argument
53 if ((off + count) > size) in w1_f2d_fix_count()
56 return count; in w1_f2d_fix_count()
66 static int w1_f2d_readblock(struct w1_slave *sl, int off, int count, char *buf) in w1_f2d_readblock() argument
81 w1_read_block(sl->master, buf, count); in w1_f2d_readblock()
87 w1_read_block(sl->master, cmp, count); in w1_f2d_readblock()
89 if (!memcmp(cmp, buf, count)) in w1_f2d_readblock()
101 loff_t off, size_t count) in eeprom_read() argument
104 int todo = count; in eeprom_read()
106 count = w1_f2d_fix_count(off, count, W1_F2D_EEPROM_SIZE); in eeprom_read()
107 if (count == 0) in eeprom_read()
122 count = -EIO; in eeprom_read()
131 return count; in eeprom_read()
207 loff_t off, size_t count) in eeprom_write() argument
213 count = w1_f2d_fix_count(off, count, W1_F2D_EEPROM_SIZE); in eeprom_write()
214 if (count == 0) in eeprom_write()
221 len = count; in eeprom_write()
231 count = -EIO; in eeprom_write()
245 count = -EIO; in eeprom_write()
252 count = -EIO; in eeprom_write()
264 return count; in eeprom_write()