Skip to content

Commit

Permalink
[media] saa7164: Remove useless struct i2c_algo_bit_data
Browse files Browse the repository at this point in the history
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with
struct i2c_algorithm. Moreover, i2c_algo field is not used since
i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus().
Therefore, it's safe to remove it.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Ezequiel García authored and Mauro Carvalho Chehab committed Jul 30, 2012
1 parent a1367f1 commit 6fe3103
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions drivers/media/video/saa7164/saa7164-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
memcpy(&bus->i2c_adap, &saa7164_i2c_adap_template,
sizeof(bus->i2c_adap));

memcpy(&bus->i2c_algo, &saa7164_i2c_algo_template,
sizeof(bus->i2c_algo));

memcpy(&bus->i2c_client, &saa7164_i2c_client_template,
sizeof(bus->i2c_client));

Expand All @@ -120,7 +117,6 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
strlcpy(bus->i2c_adap.name, bus->dev->name,
sizeof(bus->i2c_adap.name));

bus->i2c_algo.data = bus;
bus->i2c_adap.algo_data = bus;
i2c_set_adapdata(&bus->i2c_adap, bus);
i2c_add_adapter(&bus->i2c_adap);
Expand Down
1 change: 0 additions & 1 deletion drivers/media/video/saa7164/saa7164.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ struct saa7164_i2c {

/* I2C I/O */
struct i2c_adapter i2c_adap;
struct i2c_algo_bit_data i2c_algo;
struct i2c_client i2c_client;
u32 i2c_rc;
};
Expand Down

0 comments on commit 6fe3103

Please sign in to comment.