Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7193
b: refs/heads/master
c: fae91e7
h: refs/heads/master
i:
  7191: db16717
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Sep 5, 2005
1 parent cd916e5 commit 6e6a37a
Show file tree
Hide file tree
Showing 21 changed files with 54 additions and 66 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b5439652af79106b792faf79b2c1e787e143ba0
refs/heads/master: fae91e72b79ba9a21f0ce7551a1fd7e8984c85a6
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/bt832.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static struct i2c_driver driver = {
};
static struct i2c_client client_template =
{
I2C_DEVNAME("bt832"),
.name = "bt832",
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/media/video/bttv-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static struct i2c_adapter bttv_i2c_adap_sw_template = {
#ifdef I2C_CLASS_TV_ANALOG
.class = I2C_CLASS_TV_ANALOG,
#endif
I2C_DEVNAME("bt848"),
.name = "bt848",
.id = I2C_HW_B_BT848,
.client_register = attach_inform,
};
Expand Down Expand Up @@ -280,7 +280,7 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = {
#ifdef I2C_CLASS_TV_ANALOG
.class = I2C_CLASS_TV_ANALOG,
#endif
I2C_DEVNAME("bt878"),
.name = "bt878",
.id = I2C_HW_B_BT848 /* FIXME */,
.algo = &bttv_algo,
.client_register = attach_inform,
Expand All @@ -296,7 +296,7 @@ static int attach_inform(struct i2c_client *client)
if (bttv_debug)
printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n",
btv->c.nr,client->driver->name,client->addr,
i2c_clientname(client));
client->name);
if (!client->driver->command)
return 0;

Expand Down Expand Up @@ -324,7 +324,7 @@ void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg)
}

static struct i2c_client bttv_i2c_client_template = {
I2C_DEVNAME("bttv internal"),
.name = "bttv internal",
};


Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/media/video/cx88/cx88-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int attach_inform(struct i2c_client *client)
struct cx88_core *core = i2c_get_adapdata(client->adapter);

dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
client->driver->name,client->addr,i2c_clientname(client));
client->driver->name, client->addr, client->name);
if (!client->driver->command)
return 0;

Expand Down Expand Up @@ -128,7 +128,7 @@ static int detach_inform(struct i2c_client *client)
{
struct cx88_core *core = i2c_get_adapdata(client->adapter);

dprintk(1, "i2c detach [client=%s]\n", i2c_clientname(client));
dprintk(1, "i2c detach [client=%s]\n", client->name);
return 0;
}

Expand All @@ -152,15 +152,15 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = {
/* ----------------------------------------------------------------------- */

static struct i2c_adapter cx8800_i2c_adap_template = {
I2C_DEVNAME("cx2388x"),
.name = "cx2388x",
.owner = THIS_MODULE,
.id = I2C_HW_B_CX2388x,
.client_register = attach_inform,
.client_unregister = detach_inform,
};

static struct i2c_client cx8800_i2c_client_template = {
I2C_DEVNAME("cx88xx internal"),
.name = "cx88xx internal",
};

static char *i2c_devs[128] = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/ir-kbd-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static struct i2c_driver driver = {

static struct i2c_client client_template =
{
I2C_DEVNAME("unset"),
.name = "unset",
.driver = &driver
};

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/msp3400.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ static struct i2c_driver driver = {

static struct i2c_client client_template =
{
I2C_DEVNAME("(unset)"),
.name = "(unset)",
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
Expand Down Expand Up @@ -1509,7 +1509,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
}

/* hello world :-) */
printk(KERN_INFO "msp34xx: init: chip=%s",i2c_clientname(c));
printk(KERN_INFO "msp34xx: init: chip=%s", c->name);
if (HAVE_NICAM(msp))
printk(" +nicam");
if (HAVE_SIMPLE(msp))
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/media/video/ovcamchip/ovcamchip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static int ovcamchip_attach(struct i2c_adapter *adap)
}
memcpy(c, &client_template, sizeof *c);
c->adapter = adap;
strcpy(i2c_clientname(c), "OV????");
strcpy(c->name, "OV????");

ov = kmalloc(sizeof *ov, GFP_KERNEL);
if (!ov) {
Expand All @@ -328,7 +328,7 @@ static int ovcamchip_attach(struct i2c_adapter *adap)
if (rc < 0)
goto error;

strcpy(i2c_clientname(c), chip_names[ov->subtype]);
strcpy(c->name, chip_names[ov->subtype]);

PDEBUG(1, "Camera chip detection complete");

Expand Down Expand Up @@ -421,7 +421,7 @@ static struct i2c_driver driver = {
};

static struct i2c_client client_template = {
I2C_DEVNAME("(unset)"),
.name = "(unset)",
.driver = &driver,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/saa7134/saa6752hs.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ static struct i2c_driver driver = {

static struct i2c_client client_template =
{
I2C_DEVNAME("saa6752hs"),
.name = "saa6752hs",
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/media/video/saa7134/saa7134-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ static int attach_inform(struct i2c_client *client)
struct tuner_setup tun_setup;

d1printk( "%s i2c attach [addr=0x%x,client=%s]\n",
client->driver->name,client->addr,i2c_clientname(client));
client->driver->name, client->addr, client->name);

if (!client->driver->command)
return 0;
Expand Down Expand Up @@ -380,14 +380,14 @@ static struct i2c_adapter saa7134_adap_template = {
#ifdef I2C_CLASS_TV_ANALOG
.class = I2C_CLASS_TV_ANALOG,
#endif
I2C_DEVNAME("saa7134"),
.name = "saa7134",
.id = I2C_HW_SAA7134,
.algo = &saa7134_algo,
.client_register = attach_inform,
};

static struct i2c_client saa7134_client_template = {
I2C_DEVNAME("saa7134 internal"),
.name = "saa7134 internal",
};

/* ----------------------------------------------------------- */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tda7432.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static struct i2c_driver driver = {

static struct i2c_client client_template =
{
I2C_DEVNAME("tda7432"),
.name = "tda7432",
.driver = &driver,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tda9840.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static struct i2c_driver driver = {
};

static struct i2c_client client_template = {
I2C_DEVNAME("tda9840"),
.name = "tda9840",
.driver = &driver,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tda9875.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ static struct i2c_driver driver = {

static struct i2c_client client_template =
{
I2C_DEVNAME("tda9875"),
.name = "tda9875",
.driver = &driver,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tda9887.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ static struct i2c_driver driver = {
};
static struct i2c_client client_template =
{
I2C_DEVNAME("tda9887"),
.name = "tda9887",
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tea6415c.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static struct i2c_driver driver = {
};

static struct i2c_client client_template = {
I2C_DEVNAME("tea6415c"),
.name = "tea6415c",
.driver = &driver,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tea6420.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static struct i2c_driver driver = {
};

static struct i2c_client client_template = {
I2C_DEVNAME("tea6420"),
.name = "tea6420",
.driver = &driver,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ static struct i2c_driver driver = {
},
};
static struct i2c_client client_template = {
I2C_DEVNAME("(tuner unset)"),
.name = "(tuner unset)",
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
Expand Down
41 changes: 19 additions & 22 deletions trunk/drivers/media/video/tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,23 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val)
unsigned char buffer[2];

if (-1 == subaddr) {
dprintk("%s: chip_write: 0x%x\n",
i2c_clientname(&chip->c), val);
dprintk("%s: chip_write: 0x%x\n", chip->c.name, val);
chip->shadow.bytes[1] = val;
buffer[0] = val;
if (1 != i2c_master_send(&chip->c,buffer,1)) {
printk(KERN_WARNING "%s: I/O error (write 0x%x)\n",
i2c_clientname(&chip->c), val);
chip->c.name, val);
return -1;
}
} else {
dprintk("%s: chip_write: reg%d=0x%x\n",
i2c_clientname(&chip->c), subaddr, val);
chip->c.name, subaddr, val);
chip->shadow.bytes[subaddr+1] = val;
buffer[0] = subaddr;
buffer[1] = val;
if (2 != i2c_master_send(&chip->c,buffer,2)) {
printk(KERN_WARNING "%s: I/O error (write reg%d=0x%x)\n",
i2c_clientname(&chip->c), subaddr, val);
chip->c.name, subaddr, val);
return -1;
}
}
Expand All @@ -203,11 +202,10 @@ static int chip_read(struct CHIPSTATE *chip)
unsigned char buffer;

if (1 != i2c_master_recv(&chip->c,&buffer,1)) {
printk(KERN_WARNING "%s: I/O error (read)\n",
i2c_clientname(&chip->c));
printk(KERN_WARNING "%s: I/O error (read)\n", chip->c.name);
return -1;
}
dprintk("%s: chip_read: 0x%x\n",i2c_clientname(&chip->c),buffer);
dprintk("%s: chip_read: 0x%x\n", chip->c.name, buffer);
return buffer;
}

Expand All @@ -222,12 +220,11 @@ static int chip_read2(struct CHIPSTATE *chip, int subaddr)
write[0] = subaddr;

if (2 != i2c_transfer(chip->c.adapter,msgs,2)) {
printk(KERN_WARNING "%s: I/O error (read2)\n",
i2c_clientname(&chip->c));
printk(KERN_WARNING "%s: I/O error (read2)\n", chip->c.name);
return -1;
}
dprintk("%s: chip_read2: reg%d=0x%x\n",
i2c_clientname(&chip->c),subaddr,read[0]);
chip->c.name, subaddr, read[0]);
return read[0];
}

Expand All @@ -240,7 +237,7 @@ static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd)

/* update our shadow register set; print bytes if (debug > 0) */
dprintk("%s: chip_cmd(%s): reg=%d, data:",
i2c_clientname(&chip->c),name,cmd->bytes[0]);
chip->c.name, name, cmd->bytes[0]);
for (i = 1; i < cmd->count; i++) {
dprintk(" 0x%x",cmd->bytes[i]);
chip->shadow.bytes[i+cmd->bytes[0]] = cmd->bytes[i];
Expand All @@ -249,7 +246,7 @@ static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd)

/* send data to the chip */
if (cmd->count != i2c_master_send(&chip->c,cmd->bytes,cmd->count)) {
printk(KERN_WARNING "%s: I/O error (%s)\n", i2c_clientname(&chip->c), name);
printk(KERN_WARNING "%s: I/O error (%s)\n", chip->c.name, name);
return -1;
}
return 0;
Expand All @@ -274,9 +271,9 @@ static int chip_thread(void *data)
struct CHIPSTATE *chip = data;
struct CHIPDESC *desc = chiplist + chip->type;

daemonize("%s",i2c_clientname(&chip->c));
daemonize("%s", chip->c.name);
allow_signal(SIGTERM);
dprintk("%s: thread started\n", i2c_clientname(&chip->c));
dprintk("%s: thread started\n", chip->c.name);

for (;;) {
add_wait_queue(&chip->wq, &wait);
Expand All @@ -288,7 +285,7 @@ static int chip_thread(void *data)
try_to_freeze();
if (chip->done || signal_pending(current))
break;
dprintk("%s: thread wakeup\n", i2c_clientname(&chip->c));
dprintk("%s: thread wakeup\n", chip->c.name);

/* don't do anything for radio or if mode != auto */
if (chip->norm == VIDEO_MODE_RADIO || chip->mode != 0)
Expand All @@ -301,7 +298,7 @@ static int chip_thread(void *data)
mod_timer(&chip->wt, jiffies+2*HZ);
}

dprintk("%s: thread exiting\n", i2c_clientname(&chip->c));
dprintk("%s: thread exiting\n", chip->c.name);
complete_and_exit(&chip->texit, 0);
return 0;
}
Expand All @@ -314,7 +311,7 @@ static void generic_checkmode(struct CHIPSTATE *chip)
if (mode == chip->prevmode)
return;

dprintk("%s: thread checkmode\n", i2c_clientname(&chip->c));
dprintk("%s: thread checkmode\n", chip->c.name);
chip->prevmode = mode;

if (mode & VIDEO_SOUND_STEREO)
Expand Down Expand Up @@ -1501,7 +1498,7 @@ static int chip_attach(struct i2c_adapter *adap, int addr, int kind)
(desc->flags & CHIP_HAS_INPUTSEL) ? " audiomux" : "");

/* fill required data structures */
strcpy(i2c_clientname(&chip->c),desc->name);
strcpy(chip->c.name, desc->name);
chip->type = desc-chiplist;
chip->shadow.count = desc->registers+1;
chip->prevmode = -1;
Expand Down Expand Up @@ -1538,7 +1535,7 @@ static int chip_attach(struct i2c_adapter *adap, int addr, int kind)
chip->tpid = kernel_thread(chip_thread,(void *)chip,0);
if (chip->tpid < 0)
printk(KERN_WARNING "%s: kernel_thread() failed\n",
i2c_clientname(&chip->c));
chip->c.name);
wake_up_interruptible(&chip->wq);
}
return 0;
Expand Down Expand Up @@ -1591,7 +1588,7 @@ static int chip_command(struct i2c_client *client,
struct CHIPSTATE *chip = i2c_get_clientdata(client);
struct CHIPDESC *desc = chiplist + chip->type;

dprintk("%s: chip_command 0x%x\n",i2c_clientname(&chip->c),cmd);
dprintk("%s: chip_command 0x%x\n", chip->c.name, cmd);

switch (cmd) {
case AUDC_SET_INPUT:
Expand Down Expand Up @@ -1702,7 +1699,7 @@ static struct i2c_driver driver = {

static struct i2c_client client_template =
{
I2C_DEVNAME("(unset)"),
.name = "(unset)",
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
Expand Down
Loading

0 comments on commit 6e6a37a

Please sign in to comment.