diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-12-12 11:40:54 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-12-12 11:40:54 +0100 |
commit | 26c3676df881b3421f5c88b0afb721c214134391 (patch) | |
tree | b483597a3a19532de97e698ce521dbc7fff299e9 /linux/drivers/media/video/vp27smpx.c | |
parent | 642b87bb86b04cefe8178a76f63ea7bf6222b338 (diff) | |
download | mediapointer-dvb-s2-26c3676df881b3421f5c88b0afb721c214134391.tar.gz mediapointer-dvb-s2-26c3676df881b3421f5c88b0afb721c214134391.tar.bz2 |
vp27smpx: CodingStyle cleanup.
From: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/vp27smpx.c')
-rw-r--r-- | linux/drivers/media/video/vp27smpx.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/linux/drivers/media/video/vp27smpx.c b/linux/drivers/media/video/vp27smpx.c index 3aa74a560..922aa8d74 100644 --- a/linux/drivers/media/video/vp27smpx.c +++ b/linux/drivers/media/video/vp27smpx.c @@ -31,7 +31,7 @@ #include <media/v4l2-common.h> #include <media/v4l2-chip-ident.h> #include <media/v4l2-i2c-drv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) #include "i2c-compat.h" #include <linux/slab.h> #endif @@ -44,7 +44,7 @@ MODULE_LICENSE("GPL"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0xb6 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; #endif @@ -64,27 +64,26 @@ static void vp27smpx_set_audmode(struct i2c_client *client, u32 audmode) u8 data[3] = { 0x00, 0x00, 0x04 }; switch (audmode) { - case V4L2_TUNER_MODE_MONO: - case V4L2_TUNER_MODE_LANG1: - break; - case V4L2_TUNER_MODE_STEREO: - case V4L2_TUNER_MODE_LANG1_LANG2: - data[1] = 0x01; - break; - case V4L2_TUNER_MODE_LANG2: - data[1] = 0x02; - break; + case V4L2_TUNER_MODE_MONO: + case V4L2_TUNER_MODE_LANG1: + break; + case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: + data[1] = 0x01; + break; + case V4L2_TUNER_MODE_LANG2: + data[1] = 0x02; + break; } - if (i2c_master_send(client, data, sizeof(data)) != sizeof(data)) { - v4l_err(client, "%s: I/O error setting audmode\n", client->name); - } - else { + if (i2c_master_send(client, data, sizeof(data)) != sizeof(data)) + v4l_err(client, "%s: I/O error setting audmode\n", + client->name); + else state->audmode = audmode; - } } -static int vp27smpx_command(struct i2c_client *client, unsigned int cmd, void *arg) +static int vp27smpx_command(struct i2c_client *client, unsigned cmd, void *arg) { struct vp27smpx_state *state = i2c_get_clientdata(client); struct v4l2_tuner *vt = arg; @@ -113,7 +112,8 @@ static int vp27smpx_command(struct i2c_client *client, unsigned int cmd, void *a break; case VIDIOC_G_CHIP_IDENT: - return v4l2_chip_ident_i2c_client(client, arg, V4L2_IDENT_VP27SMPX, 0); + return v4l2_chip_ident_i2c_client(client, arg, + V4L2_IDENT_VP27SMPX, 0); case VIDIOC_LOG_STATUS: v4l_info(client, "Audio Mode: %u%s\n", state->audmode, @@ -145,12 +145,12 @@ static int vp27smpx_probe(struct i2c_client *client) snprintf(client->name, sizeof(client->name) - 1, "vp27smpx"); - v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); + v4l_info(client, "chip found @ 0x%x (%s)\n", + client->addr << 1, client->adapter->name); state = kzalloc(sizeof(struct vp27smpx_state), GFP_KERNEL); - if (state == NULL) { + if (state == NULL) return -ENOMEM; - } state->audmode = V4L2_TUNER_MODE_STEREO; i2c_set_clientdata(client, state); @@ -178,6 +178,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { #endif }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) EXPORT_NO_SYMBOLS; #endif |