#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "hw/i2c/smbus_eeprom.h"
+#include "qom/object.h"
//#define DEBUG
#define TYPE_SMBUS_EEPROM "smbus-eeprom"
+typedef struct SMBusEEPROMDevice SMBusEEPROMDevice;
#define SMBUS_EEPROM(obj) \
OBJECT_CHECK(SMBusEEPROMDevice, (obj), TYPE_SMBUS_EEPROM)
#define SMBUS_EEPROM_SIZE 256
-typedef struct SMBusEEPROMDevice {
+struct SMBusEEPROMDevice {
SMBusDevice smbusdev;
uint8_t data[SMBUS_EEPROM_SIZE];
uint8_t *init_data;
uint8_t offset;
bool accessed;
-} SMBusEEPROMDevice;
+};
static uint8_t eeprom_receive_byte(SMBusDevice *dev)
{