master/slave.c
changeset 597 3a2c2d6ca5e9
parent 596 f2d874b2caa6
child 599 a6ce861a167e
equal deleted inserted replaced
596:f2d874b2caa6 597:3a2c2d6ca5e9
   787 {
   787 {
   788     uint16_t word_size, cat_type, cat_size;
   788     uint16_t word_size, cat_type, cat_size;
   789     const uint16_t *data_words, *next_header;
   789     const uint16_t *data_words, *next_header;
   790     uint16_t *new_data;
   790     uint16_t *new_data;
   791 
   791 
   792     if (!slave->master->eeprom_write_enable) {
       
   793         EC_ERR("Writing EEPROMs not allowed! Enable via"
       
   794                " eeprom_write_enable SysFS entry.\n");
       
   795         return -1;
       
   796     }
       
   797 
       
   798     if (slave->master->mode != EC_MASTER_MODE_IDLE) {
   792     if (slave->master->mode != EC_MASTER_MODE_IDLE) {
   799         EC_ERR("Writing EEPROMs only allowed in idle mode!\n");
   793         EC_ERR("Writing EEPROMs only allowed in idle mode!\n");
   800         return -1;
   794         return -1;
   801     }
   795     }
   802 
   796