Re: [PATCH] Staging: comedi: dyna_pci10xx: replace semaphore withmutex
From: Ian Abbott
Date: Thu Jun 09 2011 - 08:00:25 EST
On 09/06/11 12:52, Prashant P. Shah wrote:
> - sema_init(&devpriv->sem, 1);
> + mutex_init(&devpriv->mutex);
> dev->board_ptr = &boardtypes[board_index];
> devpriv->pci_dev = pcidev;
You could call mutex_destroy() in your _detach routine as well. It's
used for debugging mutexes:
static int dyna_pci10xx_detach(struct comedi_device *dev)
{
if (devpriv && devpriv->pci_dev) {
comedi_pci_disable(devpriv->pci_dev);
mutex_destroy(&devpriv->mutex);
}
return 0;
}
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/