master/cdev.c
changeset 1075 94c6e36e0f8d
parent 1057 435d7f36f13d
child 1079 ef1266652c4d
equal deleted inserted replaced
1074:a82793a6d1a0 1075:94c6e36e0f8d
   136 
   136 
   137     if (master->debug_level)
   137     if (master->debug_level)
   138         EC_DBG("ioctl(filp = %x, cmd = %u (%u), arg = %x)\n",
   138         EC_DBG("ioctl(filp = %x, cmd = %u (%u), arg = %x)\n",
   139                 (u32) filp, (u32) cmd, (u32) _IOC_NR(cmd), (u32) arg);
   139                 (u32) filp, (u32) cmd, (u32) _IOC_NR(cmd), (u32) arg);
   140 
   140 
   141     // FIXME lock
   141     down(&master->master_sem);
   142     
   142 
   143     switch (cmd) {
   143     switch (cmd) {
   144         case EC_IOCTL_MASTER:
   144         case EC_IOCTL_MASTER:
   145             {
   145             {
   146                 ec_ioctl_master_t data;
   146                 ec_ioctl_master_t data;
   147 
   147 
  1010 
  1010 
  1011         default:
  1011         default:
  1012             retval = -ENOTTY;
  1012             retval = -ENOTTY;
  1013     }
  1013     }
  1014 
  1014 
       
  1015     up(&master->master_sem);
  1015     return retval;
  1016     return retval;
  1016 }
  1017 }
  1017 
  1018 
  1018 /*****************************************************************************/
  1019 /*****************************************************************************/