Commit 1ee1f748 authored by Jan Dittmer's avatar Jan Dittmer Committed by Greg Kroah-Hartman

[PATCH] i2c: fix compile bugs in tvmixer.c

Additionally I need the following patch to tvmixer.c to compile properly
with CONFIG_SOUND_TVMIXER=m. Just a /client->name/client->dev.name/g.
parent d189d057
...@@ -87,7 +87,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm ...@@ -87,7 +87,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
if (cmd == SOUND_MIXER_INFO) { if (cmd == SOUND_MIXER_INFO) {
mixer_info info; mixer_info info;
strncpy(info.id, "tv card", sizeof(info.id)); strncpy(info.id, "tv card", sizeof(info.id));
strncpy(info.name, client->name, sizeof(info.name)); strncpy(info.name, client->dev.name, sizeof(info.name));
info.modify_counter = 42 /* FIXME */; info.modify_counter = 42 /* FIXME */;
if (copy_to_user((void *)arg, &info, sizeof(info))) if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT; return -EFAULT;
...@@ -96,7 +96,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm ...@@ -96,7 +96,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
if (cmd == SOUND_OLD_MIXER_INFO) { if (cmd == SOUND_OLD_MIXER_INFO) {
_old_mixer_info info; _old_mixer_info info;
strncpy(info.id, "tv card", sizeof(info.id)); strncpy(info.id, "tv card", sizeof(info.id));
strncpy(info.name, client->name, sizeof(info.name)); strncpy(info.name, client->dev.name, sizeof(info.name));
if (copy_to_user((void *)arg, &info, sizeof(info))) if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT; return -EFAULT;
return 0; return 0;
...@@ -237,7 +237,7 @@ static int tvmixer_adapters(struct i2c_adapter *adap) ...@@ -237,7 +237,7 @@ static int tvmixer_adapters(struct i2c_adapter *adap)
int i; int i;
if (debug) if (debug)
printk("tvmixer: adapter %s\n",adap->name); printk("tvmixer: adapter %s\n",adap->dev.name);
for (i=0; i<I2C_CLIENT_MAX; i++) { for (i=0; i<I2C_CLIENT_MAX; i++) {
if (!adap->clients[i]) if (!adap->clients[i])
continue; continue;
...@@ -261,10 +261,10 @@ static int tvmixer_clients(struct i2c_client *client) ...@@ -261,10 +261,10 @@ static int tvmixer_clients(struct i2c_client *client)
/* ignore that one */ /* ignore that one */
if (debug) if (debug)
printk("tvmixer: %s is not a tv card\n", printk("tvmixer: %s is not a tv card\n",
client->adapter->name); client->adapter->dev.name);
return -1; return -1;
} }
printk("tvmixer: debug: %s\n",client->name); printk("tvmixer: debug: %s\n",client->dev.name);
/* unregister ?? */ /* unregister ?? */
for (i = 0; i < DEV_MAX; i++) { for (i = 0; i < DEV_MAX; i++) {
...@@ -273,7 +273,7 @@ static int tvmixer_clients(struct i2c_client *client) ...@@ -273,7 +273,7 @@ static int tvmixer_clients(struct i2c_client *client)
unregister_sound_mixer(devices[i].minor); unregister_sound_mixer(devices[i].minor);
devices[i].dev = NULL; devices[i].dev = NULL;
devices[i].minor = -1; devices[i].minor = -1;
printk("tvmixer: %s unregistered (#1)\n",client->name); printk("tvmixer: %s unregistered (#1)\n",client->dev.name);
return 0; return 0;
} }
} }
...@@ -298,13 +298,13 @@ static int tvmixer_clients(struct i2c_client *client) ...@@ -298,13 +298,13 @@ static int tvmixer_clients(struct i2c_client *client)
if (0 != client->driver->command(client,VIDIOCGAUDIO,&va)) { if (0 != client->driver->command(client,VIDIOCGAUDIO,&va)) {
if (debug) if (debug)
printk("tvmixer: %s: VIDIOCGAUDIO failed\n", printk("tvmixer: %s: VIDIOCGAUDIO failed\n",
client->name); client->dev.name);
return -1; return -1;
} }
if (0 == (va.flags & VIDEO_AUDIO_VOLUME)) { if (0 == (va.flags & VIDEO_AUDIO_VOLUME)) {
if (debug) if (debug)
printk("tvmixer: %s: has no volume control\n", printk("tvmixer: %s: has no volume control\n",
client->name); client->dev.name);
return -1; return -1;
} }
...@@ -318,7 +318,7 @@ static int tvmixer_clients(struct i2c_client *client) ...@@ -318,7 +318,7 @@ static int tvmixer_clients(struct i2c_client *client)
devices[i].count = 0; devices[i].count = 0;
devices[i].dev = client; devices[i].dev = client;
printk("tvmixer: %s (%s) registered with minor %d\n", printk("tvmixer: %s (%s) registered with minor %d\n",
client->name,client->adapter->name,minor); client->dev.name,client->adapter->dev.name,minor);
return 0; return 0;
} }
...@@ -344,7 +344,7 @@ static void tvmixer_cleanup_module(void) ...@@ -344,7 +344,7 @@ static void tvmixer_cleanup_module(void)
if (devices[i].minor != -1) { if (devices[i].minor != -1) {
unregister_sound_mixer(devices[i].minor); unregister_sound_mixer(devices[i].minor);
printk("tvmixer: %s unregistered (#2)\n", printk("tvmixer: %s unregistered (#2)\n",
devices[i].dev->name); devices[i].dev->dev.name);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment