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-sf16fmi.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-sf16fmi.c')
-rw-r--r-- | drivers/media/radio/radio-sf16fmi.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index 53073b424107..70cfbc3910dd 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * Frequency control is done digitally -- ie out(port,encodefreq(95.8)); | 12 | * Frequency control is done digitally -- ie out(port,encodefreq(95.8)); |
13 | * No volume control - only mute/unmute - you have to use line volume | 13 | * No volume control - only mute/unmute - you have to use line volume |
14 | * control on SB-part of SF16FMI | 14 | * control on SB-part of SF16FMI |
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/kernel.h> /* __setup */ | 18 | #include <linux/kernel.h> /* __setup */ |
@@ -29,19 +29,19 @@ | |||
29 | struct fmi_device | 29 | struct fmi_device |
30 | { | 30 | { |
31 | int port; | 31 | int port; |
32 | int curvol; /* 1 or 0 */ | 32 | int curvol; /* 1 or 0 */ |
33 | unsigned long curfreq; /* freq in kHz */ | 33 | unsigned long curfreq; /* freq in kHz */ |
34 | __u32 flags; | 34 | __u32 flags; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static int io = -1; | 37 | static int io = -1; |
38 | static int radio_nr = -1; | 38 | static int radio_nr = -1; |
39 | static struct pnp_dev *dev = NULL; | 39 | static struct pnp_dev *dev = NULL; |
40 | static struct mutex lock; | 40 | static struct mutex lock; |
41 | 41 | ||
42 | /* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */ | 42 | /* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */ |
43 | /* It is only useful to give freq in intervall of 800 (=0.05Mhz), | 43 | /* It is only useful to give freq in intervall of 800 (=0.05Mhz), |
44 | * other bits will be truncated, e.g 92.7400016 -> 92.7, but | 44 | * other bits will be truncated, e.g 92.7400016 -> 92.7, but |
45 | * 92.7400017 -> 92.75 | 45 | * 92.7400017 -> 92.75 |
46 | */ | 46 | */ |
47 | #define RSF16_ENCODE(x) ((x)/800+214) | 47 | #define RSF16_ENCODE(x) ((x)/800+214) |
@@ -51,7 +51,7 @@ static struct mutex lock; | |||
51 | static void outbits(int bits, unsigned int data, int port) | 51 | static void outbits(int bits, unsigned int data, int port) |
52 | { | 52 | { |
53 | while(bits--) { | 53 | while(bits--) { |
54 | if(data & 1) { | 54 | if(data & 1) { |
55 | outb(5, port); | 55 | outb(5, port); |
56 | udelay(6); | 56 | udelay(6); |
57 | outb(7, port); | 57 | outb(7, port); |
@@ -101,7 +101,7 @@ static inline int fmi_getsigstr(struct fmi_device *dev) | |||
101 | int res; | 101 | int res; |
102 | int myport = dev->port; | 102 | int myport = dev->port; |
103 | 103 | ||
104 | 104 | ||
105 | mutex_lock(&lock); | 105 | mutex_lock(&lock); |
106 | val = dev->curvol ? 0x08 : 0x00; /* unmute/mute */ | 106 | val = dev->curvol ? 0x08 : 0x00; /* unmute/mute */ |
107 | outb(val, myport); | 107 | outb(val, myport); |
@@ -109,7 +109,7 @@ static inline int fmi_getsigstr(struct fmi_device *dev) | |||
109 | msleep(143); /* was schedule_timeout(HZ/7) */ | 109 | msleep(143); /* was schedule_timeout(HZ/7) */ |
110 | res = (int)inb(myport+1); | 110 | res = (int)inb(myport+1); |
111 | outb(val, myport); | 111 | outb(val, myport); |
112 | 112 | ||
113 | mutex_unlock(&lock); | 113 | mutex_unlock(&lock); |
114 | return (res & 2) ? 0 : 0xFFFF; | 114 | return (res & 2) ? 0 : 0xFFFF; |
115 | } | 115 | } |
@@ -119,7 +119,7 @@ static int fmi_do_ioctl(struct inode *inode, struct file *file, | |||
119 | { | 119 | { |
120 | struct video_device *dev = video_devdata(file); | 120 | struct video_device *dev = video_devdata(file); |
121 | struct fmi_device *fmi=dev->priv; | 121 | struct fmi_device *fmi=dev->priv; |
122 | 122 | ||
123 | switch(cmd) | 123 | switch(cmd) |
124 | { | 124 | { |
125 | case VIDIOCGCAP: | 125 | case VIDIOCGCAP: |
@@ -174,18 +174,18 @@ static int fmi_do_ioctl(struct inode *inode, struct file *file, | |||
174 | return -EINVAL; | 174 | return -EINVAL; |
175 | /*rounding in steps of 800 to match th freq | 175 | /*rounding in steps of 800 to match th freq |
176 | that will be used */ | 176 | that will be used */ |
177 | fmi->curfreq = (*freq/800)*800; | 177 | fmi->curfreq = (*freq/800)*800; |
178 | fmi_setfreq(fmi); | 178 | fmi_setfreq(fmi); |
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
181 | case VIDIOCGAUDIO: | 181 | case VIDIOCGAUDIO: |
182 | { | 182 | { |
183 | struct video_audio *v = arg; | 183 | struct video_audio *v = arg; |
184 | memset(v,0,sizeof(*v)); | 184 | memset(v,0,sizeof(*v)); |
185 | v->flags=( (!fmi->curvol)*VIDEO_AUDIO_MUTE | VIDEO_AUDIO_MUTABLE); | 185 | v->flags=( (!fmi->curvol)*VIDEO_AUDIO_MUTE | VIDEO_AUDIO_MUTABLE); |
186 | strcpy(v->name, "Radio"); | 186 | strcpy(v->name, "Radio"); |
187 | v->mode=VIDEO_SOUND_STEREO; | 187 | v->mode=VIDEO_SOUND_STEREO; |
188 | return 0; | 188 | return 0; |
189 | } | 189 | } |
190 | case VIDIOCSAUDIO: | 190 | case VIDIOCSAUDIO: |
191 | { | 191 | { |
@@ -193,19 +193,19 @@ static int fmi_do_ioctl(struct inode *inode, struct file *file, | |||
193 | if(v->audio) | 193 | if(v->audio) |
194 | return -EINVAL; | 194 | return -EINVAL; |
195 | fmi->curvol= v->flags&VIDEO_AUDIO_MUTE ? 0 : 1; | 195 | fmi->curvol= v->flags&VIDEO_AUDIO_MUTE ? 0 : 1; |
196 | fmi->curvol ? | 196 | fmi->curvol ? |
197 | fmi_unmute(fmi->port) : fmi_mute(fmi->port); | 197 | fmi_unmute(fmi->port) : fmi_mute(fmi->port); |
198 | return 0; | 198 | return 0; |
199 | } | 199 | } |
200 | case VIDIOCGUNIT: | 200 | case VIDIOCGUNIT: |
201 | { | 201 | { |
202 | struct video_unit *v = arg; | 202 | struct video_unit *v = arg; |
203 | v->video=VIDEO_NO_UNIT; | 203 | v->video=VIDEO_NO_UNIT; |
204 | v->vbi=VIDEO_NO_UNIT; | 204 | v->vbi=VIDEO_NO_UNIT; |
205 | v->radio=dev->minor; | 205 | v->radio=dev->minor; |
206 | v->audio=0; /* How do we find out this??? */ | 206 | v->audio=0; /* How do we find out this??? */ |
207 | v->teletext=VIDEO_NO_UNIT; | 207 | v->teletext=VIDEO_NO_UNIT; |
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
210 | default: | 210 | default: |
211 | return -ENOIOCTLCMD; | 211 | return -ENOIOCTLCMD; |
@@ -295,14 +295,14 @@ static int __init fmi_init(void) | |||
295 | fmi_unit.curfreq = 0; | 295 | fmi_unit.curfreq = 0; |
296 | fmi_unit.flags = VIDEO_TUNER_LOW; | 296 | fmi_unit.flags = VIDEO_TUNER_LOW; |
297 | fmi_radio.priv = &fmi_unit; | 297 | fmi_radio.priv = &fmi_unit; |
298 | 298 | ||
299 | mutex_init(&lock); | 299 | mutex_init(&lock); |
300 | 300 | ||
301 | if (video_register_device(&fmi_radio, VFL_TYPE_RADIO, radio_nr) == -1) { | 301 | if (video_register_device(&fmi_radio, VFL_TYPE_RADIO, radio_nr) == -1) { |
302 | release_region(io, 2); | 302 | release_region(io, 2); |
303 | return -EINVAL; | 303 | return -EINVAL; |
304 | } | 304 | } |
305 | 305 | ||
306 | printk(KERN_INFO "SF16FMx radio card driver at 0x%x\n", io); | 306 | printk(KERN_INFO "SF16FMx radio card driver at 0x%x\n", io); |
307 | /* mute card - prevents noisy bootups */ | 307 | /* mute card - prevents noisy bootups */ |
308 | fmi_mute(io); | 308 | fmi_mute(io); |