diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-08 15:06:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 00:57:53 -0400 |
commit | 4286c6f65ec01efa8f5108cadea402ecf3b12279 (patch) | |
tree | 080fc6a8f55f0ed1c9b06b5ee8421225ebe21b5b /drivers/media/radio/radio-gemtek.c | |
parent | dcdda65fd5e70a698dd3d7e65762e178290284b7 (diff) |
V4L/DVB (3753): Whitespace cleanups at media/radio
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/radio/radio-gemtek.c')
-rw-r--r-- | drivers/media/radio/radio-gemtek.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c index 47173be97b9f..77a1e12333a3 100644 --- a/drivers/media/radio/radio-gemtek.c +++ b/drivers/media/radio/radio-gemtek.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Besides the protocol changes, this is mostly a copy of: | 6 | * Besides the protocol changes, this is mostly a copy of: |
7 | * | 7 | * |
8 | * RadioTrack II driver for Linux radio support (C) 1998 Ben Pfaff | 8 | * RadioTrack II driver for Linux radio support (C) 1998 Ben Pfaff |
9 | * | 9 | * |
10 | * Based on RadioTrack I/RadioReveal (C) 1997 M. Kirkwood | 10 | * Based on RadioTrack I/RadioReveal (C) 1997 M. Kirkwood |
11 | * Converted to new API by Alan Cox <Alan.Cox@linux.org> | 11 | * Converted to new API by Alan Cox <Alan.Cox@linux.org> |
12 | * Various bugfixes and enhancements by Russell Kroll <rkroll@exploits.org> | 12 | * Various bugfixes and enhancements by Russell Kroll <rkroll@exploits.org> |
@@ -29,7 +29,7 @@ | |||
29 | #define CONFIG_RADIO_GEMTEK_PORT -1 | 29 | #define CONFIG_RADIO_GEMTEK_PORT -1 |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | static int io = CONFIG_RADIO_GEMTEK_PORT; | 32 | static int io = CONFIG_RADIO_GEMTEK_PORT; |
33 | static int radio_nr = -1; | 33 | static int radio_nr = -1; |
34 | static spinlock_t lock; | 34 | static spinlock_t lock; |
35 | 35 | ||
@@ -48,7 +48,7 @@ struct gemtek_device | |||
48 | */ | 48 | */ |
49 | static void gemtek_mute(struct gemtek_device *dev) | 49 | static void gemtek_mute(struct gemtek_device *dev) |
50 | { | 50 | { |
51 | if(dev->muted) | 51 | if(dev->muted) |
52 | return; | 52 | return; |
53 | spin_lock(&lock); | 53 | spin_lock(&lock); |
54 | outb(0x10, io); | 54 | outb(0x10, io); |
@@ -94,20 +94,20 @@ static int gemtek_setfreq(struct gemtek_device *dev, unsigned long freq) | |||
94 | freq /= 100000; | 94 | freq /= 100000; |
95 | 95 | ||
96 | spin_lock(&lock); | 96 | spin_lock(&lock); |
97 | 97 | ||
98 | /* 2 start bits */ | 98 | /* 2 start bits */ |
99 | outb_p(0x03, io); | 99 | outb_p(0x03, io); |
100 | udelay(5); | 100 | udelay(5); |
101 | outb_p(0x07, io); | 101 | outb_p(0x07, io); |
102 | udelay(5); | 102 | udelay(5); |
103 | 103 | ||
104 | /* 28 frequency bits (lsb first) */ | 104 | /* 28 frequency bits (lsb first) */ |
105 | for (i = 0; i < 14; i++) | 105 | for (i = 0; i < 14; i++) |
106 | if (freq & (1 << i)) | 106 | if (freq & (1 << i)) |
107 | one(); | 107 | one(); |
108 | else | 108 | else |
109 | zero(); | 109 | zero(); |
110 | /* 36 unknown bits */ | 110 | /* 36 unknown bits */ |
111 | for (i = 0; i < 11; i++) | 111 | for (i = 0; i < 11; i++) |
112 | zero(); | 112 | zero(); |
113 | one(); | 113 | one(); |
@@ -123,7 +123,7 @@ static int gemtek_setfreq(struct gemtek_device *dev, unsigned long freq) | |||
123 | udelay(5); | 123 | udelay(5); |
124 | 124 | ||
125 | spin_unlock(&lock); | 125 | spin_unlock(&lock); |
126 | 126 | ||
127 | return 0; | 127 | return 0; |
128 | } | 128 | } |
129 | 129 | ||
@@ -159,7 +159,7 @@ static int gemtek_do_ioctl(struct inode *inode, struct file *file, | |||
159 | case VIDIOCGTUNER: | 159 | case VIDIOCGTUNER: |
160 | { | 160 | { |
161 | struct video_tuner *v = arg; | 161 | struct video_tuner *v = arg; |
162 | if(v->tuner) /* Only 1 tuner */ | 162 | if(v->tuner) /* Only 1 tuner */ |
163 | return -EINVAL; | 163 | return -EINVAL; |
164 | v->rangelow=87*16000; | 164 | v->rangelow=87*16000; |
165 | v->rangehigh=108*16000; | 165 | v->rangehigh=108*16000; |
@@ -193,25 +193,25 @@ static int gemtek_do_ioctl(struct inode *inode, struct file *file, | |||
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | case VIDIOCGAUDIO: | 195 | case VIDIOCGAUDIO: |
196 | { | 196 | { |
197 | struct video_audio *v = arg; | 197 | struct video_audio *v = arg; |
198 | memset(v,0, sizeof(*v)); | 198 | memset(v,0, sizeof(*v)); |
199 | v->flags|=VIDEO_AUDIO_MUTABLE; | 199 | v->flags|=VIDEO_AUDIO_MUTABLE; |
200 | v->volume=1; | 200 | v->volume=1; |
201 | v->step=65535; | 201 | v->step=65535; |
202 | strcpy(v->name, "Radio"); | 202 | strcpy(v->name, "Radio"); |
203 | return 0; | 203 | return 0; |
204 | } | 204 | } |
205 | case VIDIOCSAUDIO: | 205 | case VIDIOCSAUDIO: |
206 | { | 206 | { |
207 | struct video_audio *v = arg; | 207 | struct video_audio *v = arg; |
208 | if(v->audio) | 208 | if(v->audio) |
209 | return -EINVAL; | 209 | return -EINVAL; |
210 | 210 | ||
211 | if(v->flags&VIDEO_AUDIO_MUTE) | 211 | if(v->flags&VIDEO_AUDIO_MUTE) |
212 | gemtek_mute(rt); | 212 | gemtek_mute(rt); |
213 | else | 213 | else |
214 | gemtek_unmute(rt); | 214 | gemtek_unmute(rt); |
215 | 215 | ||
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
@@ -254,14 +254,14 @@ static int __init gemtek_init(void) | |||
254 | return -EINVAL; | 254 | return -EINVAL; |
255 | } | 255 | } |
256 | 256 | ||
257 | if (!request_region(io, 4, "gemtek")) | 257 | if (!request_region(io, 4, "gemtek")) |
258 | { | 258 | { |
259 | printk(KERN_ERR "gemtek: port 0x%x already in use\n", io); | 259 | printk(KERN_ERR "gemtek: port 0x%x already in use\n", io); |
260 | return -EBUSY; | 260 | return -EBUSY; |
261 | } | 261 | } |
262 | 262 | ||
263 | gemtek_radio.priv=&gemtek_unit; | 263 | gemtek_radio.priv=&gemtek_unit; |
264 | 264 | ||
265 | if(video_register_device(&gemtek_radio, VFL_TYPE_RADIO, radio_nr)==-1) | 265 | if(video_register_device(&gemtek_radio, VFL_TYPE_RADIO, radio_nr)==-1) |
266 | { | 266 | { |
267 | release_region(io, 4); | 267 | release_region(io, 4); |
@@ -274,7 +274,7 @@ static int __init gemtek_init(void) | |||
274 | /* this is _maybe_ unnecessary */ | 274 | /* this is _maybe_ unnecessary */ |
275 | outb(0x01, io); | 275 | outb(0x01, io); |
276 | 276 | ||
277 | /* mute card - prevents noisy bootups */ | 277 | /* mute card - prevents noisy bootups */ |
278 | gemtek_unit.muted = 0; | 278 | gemtek_unit.muted = 0; |
279 | gemtek_mute(&gemtek_unit); | 279 | gemtek_mute(&gemtek_unit); |
280 | 280 | ||