X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fradio%2Fradio-maestro.c;h=36c9f5bf8cdd09a0931b863aa770e7454276fdf2;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=39c1d9118636af1a03804a42cde2f0559d2ca173;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c index 39c1d9118..36c9f5bf8 100644 --- a/drivers/media/radio/radio-maestro.c +++ b/drivers/media/radio/radio-maestro.c @@ -23,11 +23,10 @@ #include #include #include -#include +#include #include #include - #define DRIVER_VERSION "0.05" #define GPIO_DATA 0x60 /* port offset from ESS_IO_BASE */ @@ -105,7 +104,7 @@ struct radio_device { muted, /* VIDEO_AUDIO_MUTE */ stereo, /* VIDEO_TUNER_STEREO_ON */ tuned; /* signal strength (0 or 0xffff) */ - struct mutex lock; + struct semaphore lock; }; static u32 radio_bits_get(struct radio_device *dev) @@ -259,9 +258,9 @@ static int radio_ioctl(struct inode *inode, struct file *file, struct radio_device *card = video_get_drvdata(dev); int ret; - mutex_lock(&card->lock); + down(&card->lock); ret = video_usercopy(inode, file, cmd, arg, radio_function); - mutex_unlock(&card->lock); + up(&card->lock); return ret; } @@ -312,7 +311,7 @@ static int __devinit maestro_probe(struct pci_dev *pdev, } radio_unit->io = pci_resource_start(pdev, 0) + GPIO_DATA; - mutex_init(&radio_unit->lock); + init_MUTEX(&radio_unit->lock); maestro_radio_inst = video_device_alloc(); if (maestro_radio_inst == NULL) {