Lines Matching refs:eeprom_buffer
337 struct eeprom_buffer {
338 ssize_t (*write)(struct eeprom_buffer *this, const char *buffer, size_t count);
339 int flush(struct eeprom_buffer *this);
343 struct eeprom_buffer *new_eeprom_buffer(struct eeprom *eeprom);
382 We can now use it to test ``struct eeprom_buffer``:
388 struct eeprom_buffer *eeprom_buffer;
394 struct eeprom_buffer *eeprom_buffer = ctx->eeprom_buffer;
398 eeprom_buffer->flush_count = SIZE_MAX;
400 eeprom_buffer->write(eeprom_buffer, buffer, 1);
403 eeprom_buffer->write(eeprom_buffer, buffer, 1);
406 eeprom_buffer->flush(eeprom_buffer);
414 struct eeprom_buffer *eeprom_buffer = ctx->eeprom_buffer;
418 eeprom_buffer->flush_count = 2;
420 eeprom_buffer->write(eeprom_buffer, buffer, 1);
423 eeprom_buffer->write(eeprom_buffer, buffer, 1);
431 struct eeprom_buffer *eeprom_buffer = ctx->eeprom_buffer;
435 eeprom_buffer->flush_count = 2;
437 eeprom_buffer->write(eeprom_buffer, buffer, 1);
440 eeprom_buffer->write(eeprom_buffer, buffer, 2);
458 ctx->eeprom_buffer = new_eeprom_buffer(&ctx->fake_eeprom->parent);
459 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ctx->eeprom_buffer);
470 destroy_eeprom_buffer(ctx->eeprom_buffer);