struct comedi_device *device;
struct comedi_subdevice *read_subdevice;
struct comedi_subdevice *write_subdevice;
- struct device *hardware_device;
};
static DEFINE_MUTEX(comedi_board_minor_table_lock);
return ERR_PTR(-ENOMEM);
}
info->device = dev;
- info->hardware_device = hardware_device;
comedi_device_init(dev);
comedi_set_hw_dev(dev, hardware_device);
mutex_lock(&dev->mutex);
minor++) {
mutex_lock(&comedi_board_minor_table_lock);
info = comedi_board_minor_table[minor];
- if (info && info->hardware_device == hardware_device) {
+ if (info && info->device->hw_dev == hardware_device) {
comedi_board_minor_table[minor] = NULL;
mutex_unlock(&comedi_board_minor_table_lock);
comedi_free_board_file_info(info);