Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fae91e72 authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman
Browse files

[PATCH] I2C: Drop I2C_DEVNAME and i2c_clientname

I2C_DEVNAME and i2c_clientname were introduced in 2.5.68 [1] to help
media/video driver authors who wanted their code to be compatible with
both Linux 2.4 and 2.6. The cause of the incompatibility has gone since
[2], so I think we can get rid of them, as they tend to make the code
harder to read and longer to preprocess/compile for no more benefit.

I'd hope nobody seriously attempts to keep media/video driver compatible
across Linux trees anymore, BTW.

[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=104930186524598&w=2
[2] http://www.linuxhq.com/kernel/v2.6/0-test3/include/linux/i2c.h



Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5b543965
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
};
+4 −4
Original line number Diff line number Diff line
@@ -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,
};
@@ -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,
@@ -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;

@@ -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",
};


+4 −4
Original line number Diff line number Diff line
@@ -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;

@@ -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;
}

@@ -152,7 +152,7 @@ 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,
@@ -160,7 +160,7 @@ static struct i2c_adapter cx8800_i2c_adap_template = {
};

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

static char *i2c_devs[128] = {
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static struct i2c_driver driver = {

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

+2 −2
Original line number Diff line number Diff line
@@ -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,
};
@@ -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))
Loading