Lines Matching refs:eeprom_buffer
287 struct eeprom_buffer {
288 ssize_t (*write)(struct eeprom_buffer *this, const char *buffer, size_t count);
289 int flush(struct eeprom_buffer *this);
293 struct eeprom_buffer *new_eeprom_buffer(struct eeprom *eeprom);
332 We can now use it to test ``struct eeprom_buffer``:
338 struct eeprom_buffer *eeprom_buffer;
344 struct eeprom_buffer *eeprom_buffer = ctx->eeprom_buffer;
348 eeprom_buffer->flush_count = SIZE_MAX;
350 eeprom_buffer->write(eeprom_buffer, buffer, 1);
353 eeprom_buffer->write(eeprom_buffer, buffer, 1);
356 eeprom_buffer->flush(eeprom_buffer);
364 struct eeprom_buffer *eeprom_buffer = ctx->eeprom_buffer;
368 eeprom_buffer->flush_count = 2;
370 eeprom_buffer->write(eeprom_buffer, buffer, 1);
373 eeprom_buffer->write(eeprom_buffer, buffer, 1);
381 struct eeprom_buffer *eeprom_buffer = ctx->eeprom_buffer;
385 eeprom_buffer->flush_count = 2;
387 eeprom_buffer->write(eeprom_buffer, buffer, 1);
390 eeprom_buffer->write(eeprom_buffer, buffer, 2);
408 ctx->eeprom_buffer = new_eeprom_buffer(&ctx->fake_eeprom->parent);
409 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ctx->eeprom_buffer);
420 destroy_eeprom_buffer(ctx->eeprom_buffer);