Skip to content

Commit

Permalink
V4L/DVB (3753): Whitespace cleanups at media/radio
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Jun 25, 2006
1 parent dcdda65 commit 4286c6f
Show file tree
Hide file tree
Showing 19 changed files with 416 additions and 416 deletions.
2 changes: 1 addition & 1 deletion drivers/media/radio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ config RADIO_GEMTEK_PCI
Choose Y here if you have this PCI FM radio card.

In order to control your radio card, you will need to use programs
that are compatible with the Video for Linux API. Information on
that are compatible with the Video for Linux API. Information on
this API and pointers to "v4l" programs may be found at
<file:Documentation/video4linux/API.html>.

Expand Down
14 changes: 7 additions & 7 deletions drivers/media/radio/miropcm20-radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/* What ever you think about the ACI, version 0x07 is not very well!
* I can't get frequency, 'tuner status', 'tuner flags' or mute/mono
* conditions... Robert
* conditions... Robert
*/

#include <linux/module.h>
Expand Down Expand Up @@ -123,7 +123,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
struct video_device *dev = video_devdata(file);
struct pcm20_device *pcm20 = dev->priv;
int i;

switch(cmd)
{
case VIDIOCGCAP:
Expand All @@ -139,7 +139,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
case VIDIOCGTUNER:
{
struct video_tuner *v = arg;
if(v->tuner) /* Only 1 tuner */
if(v->tuner) /* Only 1 tuner */
return -EINVAL;
v->rangelow=87*16000;
v->rangehigh=108*16000;
Expand Down Expand Up @@ -172,7 +172,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
return i;
}
case VIDIOCGAUDIO:
{
{
struct video_audio *v = arg;
memset(v,0, sizeof(*v));
v->flags=VIDEO_AUDIO_MUTABLE;
Expand All @@ -183,12 +183,12 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
v->mode|=VIDEO_SOUND_MONO;
/* v->step=2048; */
strcpy(v->name, "Radio");
return 0;
return 0;
}
case VIDIOCSAUDIO:
{
struct video_audio *v = arg;
if(v->audio)
if(v->audio)
return -EINVAL;

pcm20_mute(pcm20, !!(v->flags&VIDEO_AUDIO_MUTE));
Expand Down Expand Up @@ -237,7 +237,7 @@ static int __init pcm20_init(void)
{
if(video_register_device(&pcm20_radio, VFL_TYPE_RADIO, radio_nr)==-1)
goto video_register_device;

if(attach_aci_rds()<0)
goto attach_aci_rds;

Expand Down
32 changes: 16 additions & 16 deletions drivers/media/radio/miropcm20-rds-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ static struct mutex aci_rds_mutex;
#define RDS_BUSYMASK 0x10 /* Bit 4 */
#define RDS_CLOCKMASK 0x08 /* Bit 3 */

#define RDS_DATA(x) (((x) >> RDS_DATASHIFT) & 1)
#define RDS_DATA(x) (((x) >> RDS_DATASHIFT) & 1)


#if DEBUG
static void print_matrix(char array[], unsigned int length)
{
int i, j;

for (i=0; i<length; i++) {
printk(KERN_DEBUG "aci-rds: ");
for (j=7; j>=0; j--) {
printk("%d", (array[i] >> j) & 0x1);
}
if (i%8 == 0)
printk(" byte-border\n");
else
printk("\n");
}
int i, j;

for (i=0; i<length; i++) {
printk(KERN_DEBUG "aci-rds: ");
for (j=7; j>=0; j--) {
printk("%d", (array[i] >> j) & 0x1);
}
if (i%8 == 0)
printk(" byte-border\n");
else
printk("\n");
}
}
#endif /* DEBUG */

Expand Down Expand Up @@ -114,7 +114,7 @@ static int rds_write(unsigned char cmd)
{
unsigned char sendbuffer[8];
int i;

if (byte2trans(cmd, sendbuffer, 8) != 0){
return -1;
} else {
Expand Down Expand Up @@ -151,7 +151,7 @@ static int rds_read(unsigned char databuffer[], int datasize)
I have to waitread() here */
if (rds_waitread() < 0)
return -1;

memset(databuffer, 0, datasize);

for (i=0; i< READSIZE; i++)
Expand Down Expand Up @@ -194,7 +194,7 @@ int aci_rds_cmd(unsigned char cmd, unsigned char databuffer[], int datasize)
ret = 0;

mutex_unlock(&aci_rds_mutex);

return ret;
}
EXPORT_SYMBOL(aci_rds_cmd);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/radio/miropcm20-rds.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int rds_f_release(struct inode *in, struct file *fi)

static void print_matrix(char *ch, char out[])
{
int j;
int j;

for (j=7; j>=0; j--) {
out[7-j] = ((*ch >> j) & 0x1) + '0';
Expand Down
50 changes: 25 additions & 25 deletions drivers/media/radio/radio-aimslab.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* out(port, start_increasing_volume);
* wait(a_wee_while);
* out(port, stop_changing_the_volume);
*
*
*/

#include <linux/module.h> /* Modules */
Expand All @@ -41,7 +41,7 @@
#define CONFIG_RADIO_RTRACK_PORT -1
#endif

static int io = CONFIG_RADIO_RTRACK_PORT;
static int io = CONFIG_RADIO_RTRACK_PORT;
static int radio_nr = -1;
static struct mutex lock;

Expand Down Expand Up @@ -93,12 +93,12 @@ static int rt_setvol(struct rt_device *dev, int vol)
int i;

mutex_lock(&lock);

if(vol == dev->curvol) { /* requested volume = current */
if (dev->muted) { /* user is unmuting the card */
dev->muted = 0;
outb (0xd8, io); /* enable card */
}
}
mutex_unlock(&lock);
return 0;
}
Expand All @@ -114,18 +114,18 @@ static int rt_setvol(struct rt_device *dev, int vol)

dev->muted = 0;
if(vol > dev->curvol)
for(i = dev->curvol; i < vol; i++)
for(i = dev->curvol; i < vol; i++)
rt_incvol();
else
for(i = dev->curvol; i > vol; i--)
for(i = dev->curvol; i > vol; i--)
rt_decvol();

dev->curvol = vol;
mutex_unlock(&lock);
return 0;
}

/* the 128+64 on these outb's is to keep the volume stable while tuning
/* the 128+64 on these outb's is to keep the volume stable while tuning
* without them, the volume _will_ creep up with each frequency change
* and bit 4 (+16) is to keep the signal strength meter enabled
*/
Expand All @@ -140,21 +140,21 @@ static void send_0_byte(int port, struct rt_device *dev)
outb_p(128+64+16+8+ 1, port); /* on + wr-enable + data low */
outb_p(128+64+16+8+2+1, port); /* clock */
}
sleep_delay(1000);
sleep_delay(1000);
}

static void send_1_byte(int port, struct rt_device *dev)
{
if ((dev->curvol == 0) || (dev->muted)) {
outb_p(128+64+16+4 +1, port); /* wr-enable+data high */
outb_p(128+64+16+4+2+1, port); /* clock */
}
}
else {
outb_p(128+64+16+8+4 +1, port); /* on+wr-enable+data high */
outb_p(128+64+16+8+4+2+1, port); /* clock */
}

sleep_delay(1000);
sleep_delay(1000);
}

static int rt_setfreq(struct rt_device *dev, unsigned long freq)
Expand All @@ -167,9 +167,9 @@ static int rt_setfreq(struct rt_device *dev, unsigned long freq)

freq += 171200; /* Add 10.7 MHz IF */
freq /= 800; /* Convert to 50 kHz units */

mutex_lock(&lock); /* Stop other ops interfering */

send_0_byte (io, dev); /* 0: LSB of frequency */

for (i = 0; i < 13; i++) /* : frequency bits (1-13) */
Expand All @@ -195,7 +195,7 @@ static int rt_setfreq(struct rt_device *dev, unsigned long freq)
outb (0xd0, io); /* volume steady + sigstr */
else
outb (0xd8, io); /* volume steady + sigstr + on */

mutex_unlock(&lock);

return 0;
Expand All @@ -213,7 +213,7 @@ static int rt_do_ioctl(struct inode *inode, struct file *file,
{
struct video_device *dev = video_devdata(file);
struct rt_device *rt=dev->priv;

switch(cmd)
{
case VIDIOCGCAP:
Expand All @@ -229,7 +229,7 @@ static int rt_do_ioctl(struct inode *inode, struct file *file,
case VIDIOCGTUNER:
{
struct video_tuner *v = arg;
if(v->tuner) /* Only 1 tuner */
if(v->tuner) /* Only 1 tuner */
return -EINVAL;
v->rangelow=(87*16000);
v->rangehigh=(108*16000);
Expand Down Expand Up @@ -261,21 +261,21 @@ static int rt_do_ioctl(struct inode *inode, struct file *file,
return 0;
}
case VIDIOCGAUDIO:
{
{
struct video_audio *v = arg;
memset(v,0, sizeof(*v));
v->flags|=VIDEO_AUDIO_MUTABLE|VIDEO_AUDIO_VOLUME;
v->volume=rt->curvol * 6554;
v->step=6554;
strcpy(v->name, "Radio");
return 0;
return 0;
}
case VIDIOCSAUDIO:
{
struct video_audio *v = arg;
if(v->audio)
if(v->audio)
return -EINVAL;
if(v->flags&VIDEO_AUDIO_MUTE)
if(v->flags&VIDEO_AUDIO_MUTE)
rt_mute(rt);
else
rt_setvol(rt,v->volume/6554);
Expand All @@ -298,7 +298,7 @@ static struct file_operations rtrack_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = rt_ioctl,
.ioctl = rt_ioctl,
.compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};
Expand All @@ -320,14 +320,14 @@ static int __init rtrack_init(void)
return -EINVAL;
}

if (!request_region(io, 2, "rtrack"))
if (!request_region(io, 2, "rtrack"))
{
printk(KERN_ERR "rtrack: port 0x%x already in use\n", io);
return -EBUSY;
}

rtrack_radio.priv=&rtrack_unit;

if(video_register_device(&rtrack_radio, VFL_TYPE_RADIO, radio_nr)==-1)
{
release_region(io, 2);
Expand All @@ -336,10 +336,10 @@ static int __init rtrack_init(void)
printk(KERN_INFO "AIMSlab RadioTrack/RadioReveal card driver.\n");

/* Set up the I/O locking */

mutex_init(&lock);
/* mute card - prevents noisy bootups */

/* mute card - prevents noisy bootups */

/* this ensures that the volume is all the way down */
outb(0x48, io); /* volume down but still "on" */
Expand Down
Loading

0 comments on commit 4286c6f

Please sign in to comment.