diff options
Diffstat (limited to 'drivers/media/radio/radio-aztech.c')
-rw-r--r-- | drivers/media/radio/radio-aztech.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index 523be820f9c6..83bdae23417d 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c | |||
@@ -42,7 +42,7 @@ | |||
42 | static int io = CONFIG_RADIO_AZTECH_PORT; | 42 | static int io = CONFIG_RADIO_AZTECH_PORT; |
43 | static int radio_nr = -1; | 43 | static int radio_nr = -1; |
44 | static int radio_wait_time = 1000; | 44 | static int radio_wait_time = 1000; |
45 | static struct semaphore lock; | 45 | static struct mutex lock; |
46 | 46 | ||
47 | struct az_device | 47 | struct az_device |
48 | { | 48 | { |
@@ -87,9 +87,9 @@ static void send_1_byte (struct az_device *dev) | |||
87 | 87 | ||
88 | static int az_setvol(struct az_device *dev, int vol) | 88 | static int az_setvol(struct az_device *dev, int vol) |
89 | { | 89 | { |
90 | down(&lock); | 90 | mutex_lock(&lock); |
91 | outb (volconvert(vol), io); | 91 | outb (volconvert(vol), io); |
92 | up(&lock); | 92 | mutex_unlock(&lock); |
93 | return 0; | 93 | return 0; |
94 | } | 94 | } |
95 | 95 | ||
@@ -122,7 +122,7 @@ static int az_setfreq(struct az_device *dev, unsigned long frequency) | |||
122 | frequency += 171200; /* Add 10.7 MHz IF */ | 122 | frequency += 171200; /* Add 10.7 MHz IF */ |
123 | frequency /= 800; /* Convert to 50 kHz units */ | 123 | frequency /= 800; /* Convert to 50 kHz units */ |
124 | 124 | ||
125 | down(&lock); | 125 | mutex_lock(&lock); |
126 | 126 | ||
127 | send_0_byte (dev); /* 0: LSB of frequency */ | 127 | send_0_byte (dev); /* 0: LSB of frequency */ |
128 | 128 | ||
@@ -152,7 +152,7 @@ static int az_setfreq(struct az_device *dev, unsigned long frequency) | |||
152 | udelay (radio_wait_time); | 152 | udelay (radio_wait_time); |
153 | outb_p(128+64+volconvert(dev->curvol), io); | 153 | outb_p(128+64+volconvert(dev->curvol), io); |
154 | 154 | ||
155 | up(&lock); | 155 | mutex_unlock(&lock); |
156 | 156 | ||
157 | return 0; | 157 | return 0; |
158 | } | 158 | } |
@@ -283,7 +283,7 @@ static int __init aztech_init(void) | |||
283 | return -EBUSY; | 283 | return -EBUSY; |
284 | } | 284 | } |
285 | 285 | ||
286 | init_MUTEX(&lock); | 286 | mutex_init(&lock); |
287 | aztech_radio.priv=&aztech_unit; | 287 | aztech_radio.priv=&aztech_unit; |
288 | 288 | ||
289 | if(video_register_device(&aztech_radio, VFL_TYPE_RADIO, radio_nr)==-1) | 289 | if(video_register_device(&aztech_radio, VFL_TYPE_RADIO, radio_nr)==-1) |