diff options
Diffstat (limited to 'linux/drivers/media/video/wm8775.c')
-rw-r--r-- | linux/drivers/media/video/wm8775.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c index 5a5dc4161..30e5ce058 100644 --- a/linux/drivers/media/video/wm8775.c +++ b/linux/drivers/media/video/wm8775.c @@ -33,7 +33,7 @@ #include <linux/i2c.h> #include <linux/i2c-id.h> #include <linux/videodev.h> -#include <media/audiochip.h> +#include <media/v4l2-common.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #include "i2c-compat.h" #include <linux/slab.h> @@ -43,14 +43,6 @@ MODULE_DESCRIPTION("wm8775 driver"); MODULE_AUTHOR("Ulf Eklund, Hans Verkuil"); MODULE_LICENSE("GPL"); -#define wm8775_err(fmt, arg...) do { \ - printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \ - i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) -#define wm8775_info(fmt, arg...) do { \ - printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \ - i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) - - static unsigned short normal_i2c[] = { 0x36 >> 1, I2C_CLIENT_END }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) @@ -77,7 +69,7 @@ static int wm8775_write(struct i2c_client *client, int reg, u16 val) int i; if (reg < 0 || reg >= TOT_REGS) { - wm8775_err("Invalid register R%d\n", reg); + v4l_err(client, "Invalid register R%d\n", reg); return -1; } @@ -87,7 +79,7 @@ static int wm8775_write(struct i2c_client *client, int reg, u16 val) return 0; } } - wm8775_err("I2C: cannot write %03x to register R%d\n", val, reg); + v4l_err(client, "I2C: cannot write %03x to register R%d\n", val, reg); return -1; } @@ -106,7 +98,7 @@ static int wm8775_command(struct i2c_client *client, unsigned int cmd, If only one input is active (the normal case) then the input values 1, 2, 4 or 8 should be used. */ if (input->index > 15) { - wm8775_err("Invalid input %d.\n", input->index); + v4l_err(client, "Invalid input %d.\n", input->index); return -EINVAL; } state->input = input->index; @@ -141,7 +133,7 @@ static int wm8775_command(struct i2c_client *client, unsigned int cmd, break; case VIDIOC_LOG_STATUS: - wm8775_info("Input: %d%s\n", state->input, + v4l_info(client, "Input: %d%s\n", state->input, state->muted ? " (muted)" : ""); break; @@ -198,7 +190,7 @@ static int wm8775_attach(struct i2c_adapter *adapter, int address, client->flags = I2C_CLIENT_ALLOW_USE; snprintf(client->name, sizeof(client->name) - 1, "wm8775"); - wm8775_info("chip found @ 0x%x (%s)\n", address << 1, adapter->name); + v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name); state = kmalloc(sizeof(struct wm8775_state), GFP_KERNEL); if (state == NULL) { |