* [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status
@ 2012-06-18 19:23 Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 02/12] saa7164: Remove useless struct i2c_algo_bit_data Ezequiel Garcia
` (11 more replies)
0 siblings, 12 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/saa7164/saa7164-i2c.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/saa7164/saa7164-i2c.c b/drivers/media/video/saa7164/saa7164-i2c.c
index 26148f7..536f7dc 100644
--- a/drivers/media/video/saa7164/saa7164-i2c.c
+++ b/drivers/media/video/saa7164/saa7164-i2c.c
@@ -123,7 +123,7 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
bus->i2c_algo.data = bus;
bus->i2c_adap.algo_data = bus;
i2c_set_adapdata(&bus->i2c_adap, bus);
- i2c_add_adapter(&bus->i2c_adap);
+ bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
bus->i2c_client.adapter = &bus->i2c_adap;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 02/12] saa7164: Remove useless struct i2c_algo_bit_data
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 03/12] saa7164: Replace struct memcpy with struct assignment Ezequiel Garcia
` (10 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/saa7164/saa7164-i2c.c | 4 ----
drivers/media/video/saa7164/saa7164.h | 1 -
2 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/media/video/saa7164/saa7164-i2c.c b/drivers/media/video/saa7164/saa7164-i2c.c
index 536f7dc..8df15ca 100644
--- a/drivers/media/video/saa7164/saa7164-i2c.c
+++ b/drivers/media/video/saa7164/saa7164-i2c.c
@@ -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));
@@ -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);
bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h
index 8d120e3..fc1f854 100644
--- a/drivers/media/video/saa7164/saa7164.h
+++ b/drivers/media/video/saa7164/saa7164.h
@@ -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;
};
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 03/12] saa7164: Replace struct memcpy with struct assignment
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 02/12] saa7164: Remove useless struct i2c_algo_bit_data Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 04/12] cx23885: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (9 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/saa7164/saa7164-i2c.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/media/video/saa7164/saa7164-i2c.c b/drivers/media/video/saa7164/saa7164-i2c.c
index 8df15ca..57849d6 100644
--- a/drivers/media/video/saa7164/saa7164-i2c.c
+++ b/drivers/media/video/saa7164/saa7164-i2c.c
@@ -106,11 +106,8 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
dprintk(DBGLVL_I2C, "%s(bus = %d)\n", __func__, bus->nr);
- memcpy(&bus->i2c_adap, &saa7164_i2c_adap_template,
- sizeof(bus->i2c_adap));
-
- memcpy(&bus->i2c_client, &saa7164_i2c_client_template,
- sizeof(bus->i2c_client));
+ bus->i2c_adap = saa7164_i2c_adap_template;
+ bus->i2c_client = saa7164_i2c_client_template;
bus->i2c_adap.dev.parent = &dev->pci->dev;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 04/12] cx23885: Use i2c_rc properly to store i2c register status
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 02/12] saa7164: Remove useless struct i2c_algo_bit_data Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 03/12] saa7164: Replace struct memcpy with struct assignment Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 05/12] cx23885: Remove useless struct i2c_algo_bit_data Ezequiel Garcia
` (8 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx23885/cx23885-i2c.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c
index be1e21d..7a93fc6 100644
--- a/drivers/media/video/cx23885/cx23885-i2c.c
+++ b/drivers/media/video/cx23885/cx23885-i2c.c
@@ -331,7 +331,7 @@ int cx23885_i2c_register(struct cx23885_i2c *bus)
bus->i2c_algo.data = bus;
bus->i2c_adap.algo_data = bus;
i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev);
- i2c_add_adapter(&bus->i2c_adap);
+ bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
bus->i2c_client.adapter = &bus->i2c_adap;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 05/12] cx23885: Remove useless struct i2c_algo_bit_data
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (2 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 04/12] cx23885: Use i2c_rc properly to store i2c register status Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 06/12] cx23885: Replace struct memcpy with struct assignment Ezequiel Garcia
` (7 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx23885/cx23885-i2c.c | 3 ---
drivers/media/video/cx23885/cx23885.h | 2 --
drivers/media/video/saa7164/saa7164.h | 1 -
3 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c
index 7a93fc6..1404050 100644
--- a/drivers/media/video/cx23885/cx23885-i2c.c
+++ b/drivers/media/video/cx23885/cx23885-i2c.c
@@ -318,8 +318,6 @@ int cx23885_i2c_register(struct cx23885_i2c *bus)
memcpy(&bus->i2c_adap, &cx23885_i2c_adap_template,
sizeof(bus->i2c_adap));
- memcpy(&bus->i2c_algo, &cx23885_i2c_algo_template,
- sizeof(bus->i2c_algo));
memcpy(&bus->i2c_client, &cx23885_i2c_client_template,
sizeof(bus->i2c_client));
@@ -328,7 +326,6 @@ int cx23885_i2c_register(struct cx23885_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, &dev->v4l2_dev);
bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index d884784..3cf397f 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -21,7 +21,6 @@
#include <linux/pci.h>
#include <linux/i2c.h>
-#include <linux/i2c-algo-bit.h>
#include <linux/kdev_t.h>
#include <linux/slab.h>
@@ -246,7 +245,6 @@ struct cx23885_i2c {
/* i2c i/o */
struct i2c_adapter i2c_adap;
- struct i2c_algo_bit_data i2c_algo;
struct i2c_client i2c_client;
u32 i2c_rc;
diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h
index fc1f854..35219b9 100644
--- a/drivers/media/video/saa7164/saa7164.h
+++ b/drivers/media/video/saa7164/saa7164.h
@@ -46,7 +46,6 @@
#include <linux/pci.h>
#include <linux/i2c.h>
-#include <linux/i2c-algo-bit.h>
#include <linux/kdev_t.h>
#include <linux/mutex.h>
#include <linux/crc32.h>
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 06/12] cx23885: Replace struct memcpy with struct assignment
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (3 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 05/12] cx23885: Remove useless struct i2c_algo_bit_data Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 07/12] cx231xx: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (6 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx23885/cx23885-i2c.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c
index 1404050..4c7941b 100644
--- a/drivers/media/video/cx23885/cx23885-i2c.c
+++ b/drivers/media/video/cx23885/cx23885-i2c.c
@@ -316,11 +316,8 @@ int cx23885_i2c_register(struct cx23885_i2c *bus)
dprintk(1, "%s(bus = %d)\n", __func__, bus->nr);
- memcpy(&bus->i2c_adap, &cx23885_i2c_adap_template,
- sizeof(bus->i2c_adap));
- memcpy(&bus->i2c_client, &cx23885_i2c_client_template,
- sizeof(bus->i2c_client));
-
+ bus->i2c_adap = cx23885_i2c_adap_template;
+ bus->i2c_client = cx23885_i2c_client_template;
bus->i2c_adap.dev.parent = &dev->pci->dev;
strlcpy(bus->i2c_adap.name, bus->dev->name,
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 07/12] cx231xx: Use i2c_rc properly to store i2c register status
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (4 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 06/12] cx23885: Replace struct memcpy with struct assignment Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 08/12] cx231xx: Remove useless struct i2c_algo_bit_data usage Ezequiel Garcia
` (5 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx231xx/cx231xx-i2c.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/cx231xx/cx231xx-i2c.c b/drivers/media/video/cx231xx/cx231xx-i2c.c
index 925f3a0..8064119 100644
--- a/drivers/media/video/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/video/cx231xx/cx231xx-i2c.c
@@ -511,7 +511,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
bus->i2c_algo.data = bus;
bus->i2c_adap.algo_data = bus;
i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev);
- i2c_add_adapter(&bus->i2c_adap);
+ bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
bus->i2c_client.adapter = &bus->i2c_adap;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 08/12] cx231xx: Remove useless struct i2c_algo_bit_data usage
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (5 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 07/12] cx231xx: Use i2c_rc properly to store i2c register status Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 09/12] cx231xx: Replace struct memcpy with struct assignment Ezequiel Garcia
` (4 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx231xx/cx231xx-i2c.c | 2 --
drivers/media/video/cx231xx/cx231xx.h | 2 --
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/media/video/cx231xx/cx231xx-i2c.c b/drivers/media/video/cx231xx/cx231xx-i2c.c
index 8064119..f5f4844 100644
--- a/drivers/media/video/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/video/cx231xx/cx231xx-i2c.c
@@ -500,7 +500,6 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
BUG_ON(!dev->cx231xx_send_usb_command);
memcpy(&bus->i2c_adap, &cx231xx_adap_template, sizeof(bus->i2c_adap));
- memcpy(&bus->i2c_algo, &cx231xx_algo, sizeof(bus->i2c_algo));
memcpy(&bus->i2c_client, &cx231xx_client_template,
sizeof(bus->i2c_client));
@@ -508,7 +507,6 @@ int cx231xx_i2c_register(struct cx231xx_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, &dev->v4l2_dev);
bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h
index e174475..a89d020 100644
--- a/drivers/media/video/cx231xx/cx231xx.h
+++ b/drivers/media/video/cx231xx/cx231xx.h
@@ -26,7 +26,6 @@
#include <linux/types.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
-#include <linux/i2c-algo-bit.h>
#include <linux/workqueue.h>
#include <linux/mutex.h>
@@ -481,7 +480,6 @@ struct cx231xx_i2c {
/* i2c i/o */
struct i2c_adapter i2c_adap;
- struct i2c_algo_bit_data i2c_algo;
struct i2c_client i2c_client;
u32 i2c_rc;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 09/12] cx231xx: Replace struct memcpy with struct assignment
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (6 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 08/12] cx231xx: Remove useless struct i2c_algo_bit_data usage Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 10/12] cx25821: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (3 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx231xx/cx231xx-i2c.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/media/video/cx231xx/cx231xx-i2c.c b/drivers/media/video/cx231xx/cx231xx-i2c.c
index f5f4844..2b2e91e 100644
--- a/drivers/media/video/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/video/cx231xx/cx231xx-i2c.c
@@ -499,10 +499,8 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
BUG_ON(!dev->cx231xx_send_usb_command);
- memcpy(&bus->i2c_adap, &cx231xx_adap_template, sizeof(bus->i2c_adap));
- memcpy(&bus->i2c_client, &cx231xx_client_template,
- sizeof(bus->i2c_client));
-
+ bus->i2c_adap = cx231xx_adap_template;
+ bus->i2c_client = cx231xx_client_template;
bus->i2c_adap.dev.parent = &dev->udev->dev;
strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name));
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 10/12] cx25821: Use i2c_rc properly to store i2c register status
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (7 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 09/12] cx231xx: Replace struct memcpy with struct assignment Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 11/12] cx25821: Remove useless struct i2c_algo_bit_data usage Ezequiel Garcia
` (2 subsequent siblings)
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx25821/cx25821-i2c.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/cx25821/cx25821-i2c.c b/drivers/media/video/cx25821/cx25821-i2c.c
index 6311180..398e0e6 100644
--- a/drivers/media/video/cx25821/cx25821-i2c.c
+++ b/drivers/media/video/cx25821/cx25821-i2c.c
@@ -319,7 +319,7 @@ int cx25821_i2c_register(struct cx25821_i2c *bus)
bus->i2c_algo.data = bus;
bus->i2c_adap.algo_data = bus;
i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev);
- i2c_add_adapter(&bus->i2c_adap);
+ bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
bus->i2c_client.adapter = &bus->i2c_adap;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 11/12] cx25821: Remove useless struct i2c_algo_bit_data usage
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (8 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 10/12] cx25821: Use i2c_rc properly to store i2c register status Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 12/12] cx25821: Replace struct memcpy with struct assignment Ezequiel Garcia
2012-06-25 19:29 ` [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Mauro Carvalho Chehab
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx25821/cx25821-i2c.c | 3 ---
drivers/media/video/cx25821/cx25821.h | 2 --
2 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/media/video/cx25821/cx25821-i2c.c b/drivers/media/video/cx25821/cx25821-i2c.c
index 398e0e6..431fa7f 100644
--- a/drivers/media/video/cx25821/cx25821-i2c.c
+++ b/drivers/media/video/cx25821/cx25821-i2c.c
@@ -307,8 +307,6 @@ int cx25821_i2c_register(struct cx25821_i2c *bus)
memcpy(&bus->i2c_adap, &cx25821_i2c_adap_template,
sizeof(bus->i2c_adap));
- memcpy(&bus->i2c_algo, &cx25821_i2c_algo_template,
- sizeof(bus->i2c_algo));
memcpy(&bus->i2c_client, &cx25821_i2c_client_template,
sizeof(bus->i2c_client));
@@ -316,7 +314,6 @@ int cx25821_i2c_register(struct cx25821_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, &dev->v4l2_dev);
bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
diff --git a/drivers/media/video/cx25821/cx25821.h b/drivers/media/video/cx25821/cx25821.h
index b9aa801..ed52501 100644
--- a/drivers/media/video/cx25821/cx25821.h
+++ b/drivers/media/video/cx25821/cx25821.h
@@ -26,7 +26,6 @@
#include <linux/pci.h>
#include <linux/i2c.h>
-#include <linux/i2c-algo-bit.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/sched.h>
@@ -213,7 +212,6 @@ struct cx25821_i2c {
/* i2c i/o */
struct i2c_adapter i2c_adap;
- struct i2c_algo_bit_data i2c_algo;
struct i2c_client i2c_client;
u32 i2c_rc;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 12/12] cx25821: Replace struct memcpy with struct assignment
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (9 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 11/12] cx25821: Remove useless struct i2c_algo_bit_data usage Ezequiel Garcia
@ 2012-06-18 19:23 ` Ezequiel Garcia
2012-06-25 19:29 ` [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Mauro Carvalho Chehab
11 siblings, 0 replies; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-18 19:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Ezequiel Garcia
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/video/cx25821/cx25821-i2c.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/media/video/cx25821/cx25821-i2c.c b/drivers/media/video/cx25821/cx25821-i2c.c
index 431fa7f..8a823b8 100644
--- a/drivers/media/video/cx25821/cx25821-i2c.c
+++ b/drivers/media/video/cx25821/cx25821-i2c.c
@@ -305,11 +305,8 @@ int cx25821_i2c_register(struct cx25821_i2c *bus)
dprintk(1, "%s(bus = %d)\n", __func__, bus->nr);
- memcpy(&bus->i2c_adap, &cx25821_i2c_adap_template,
- sizeof(bus->i2c_adap));
- memcpy(&bus->i2c_client, &cx25821_i2c_client_template,
- sizeof(bus->i2c_client));
-
+ bus->i2c_adap = cx25821_i2c_adap_template;
+ bus->i2c_client = cx25821_i2c_client_template;
bus->i2c_adap.dev.parent = &dev->pci->dev;
strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name));
--
1.7.4.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
` (10 preceding siblings ...)
2012-06-18 19:23 ` [PATCH 12/12] cx25821: Replace struct memcpy with struct assignment Ezequiel Garcia
@ 2012-06-25 19:29 ` Mauro Carvalho Chehab
2012-06-25 19:42 ` Ezequiel Garcia
11 siblings, 1 reply; 19+ messages in thread
From: Mauro Carvalho Chehab @ 2012-06-25 19:29 UTC (permalink / raw)
To: Ezequiel Garcia; +Cc: linux-media
Em 18-06-2012 16:23, Ezequiel Garcia escreveu:
> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
> ---
> drivers/media/video/saa7164/saa7164-i2c.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/video/saa7164/saa7164-i2c.c b/drivers/media/video/saa7164/saa7164-i2c.c
> index 26148f7..536f7dc 100644
> --- a/drivers/media/video/saa7164/saa7164-i2c.c
> +++ b/drivers/media/video/saa7164/saa7164-i2c.c
> @@ -123,7 +123,7 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
> bus->i2c_algo.data = bus;
> bus->i2c_adap.algo_data = bus;
> i2c_set_adapdata(&bus->i2c_adap, bus);
> - i2c_add_adapter(&bus->i2c_adap);
> + bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
>
> bus->i2c_client.adapter = &bus->i2c_adap;
>
>
-ENODESCRIPTION.
What are you intending with this change? AFAICT, i2c_add_bus_adapter()
returns 0 on success and a negative value otherwise. Why should it be
stored at bus->i2c_rc?
The same applies to the entire patch series.
Regards,
Mauro
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status
2012-06-25 19:29 ` [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Mauro Carvalho Chehab
@ 2012-06-25 19:42 ` Ezequiel Garcia
2012-06-25 19:49 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-25 19:42 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media
Hi Mauro,
On Mon, Jun 25, 2012 at 4:29 PM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
>> diff --git a/drivers/media/video/saa7164/saa7164-i2c.c b/drivers/media/video/saa7164/saa7164-i2c.c
>> index 26148f7..536f7dc 100644
>> --- a/drivers/media/video/saa7164/saa7164-i2c.c
>> +++ b/drivers/media/video/saa7164/saa7164-i2c.c
>> @@ -123,7 +123,7 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
>> bus->i2c_algo.data = bus;
>> bus->i2c_adap.algo_data = bus;
>> i2c_set_adapdata(&bus->i2c_adap, bus);
>> - i2c_add_adapter(&bus->i2c_adap);
>> + bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
>>
>> bus->i2c_client.adapter = &bus->i2c_adap;
>>
>>
>
> -ENODESCRIPTION.
Okey. Sorry for that.
>
> What are you intending with this change? AFAICT, i2c_add_bus_adapter()
> returns 0 on success and a negative value otherwise. Why should it be
> stored at bus->i2c_rc?
My intention was to give i2c_rc its proper use.
I looked at bttv-i2c.c and cx88-i2c.c and (perhaps wrongly) guessed
the intended use to i2c_rc was to save i2c registration result.
Without this patch, where is this bus->i2c_rc variable used?
Unless I've missed something, to me there are two options:
- use i2c_rc
- remove it
Again sorry for lack of description, I thought it was self-explaining patch.
If you provide some feedback about proper solution, I can resend the
patch series.
Thanks,
Ezequiel.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status
2012-06-25 19:42 ` Ezequiel Garcia
@ 2012-06-25 19:49 ` Mauro Carvalho Chehab
2012-06-25 20:06 ` Ezequiel Garcia
0 siblings, 1 reply; 19+ messages in thread
From: Mauro Carvalho Chehab @ 2012-06-25 19:49 UTC (permalink / raw)
To: Ezequiel Garcia; +Cc: linux-media
Em 25-06-2012 16:42, Ezequiel Garcia escreveu:
> Hi Mauro,
>
> On Mon, Jun 25, 2012 at 4:29 PM, Mauro Carvalho Chehab
> <mchehab@redhat.com> wrote:
>>> diff --git a/drivers/media/video/saa7164/saa7164-i2c.c b/drivers/media/video/saa7164/saa7164-i2c.c
>>> index 26148f7..536f7dc 100644
>>> --- a/drivers/media/video/saa7164/saa7164-i2c.c
>>> +++ b/drivers/media/video/saa7164/saa7164-i2c.c
>>> @@ -123,7 +123,7 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
>>> bus->i2c_algo.data = bus;
>>> bus->i2c_adap.algo_data = bus;
>>> i2c_set_adapdata(&bus->i2c_adap, bus);
>>> - i2c_add_adapter(&bus->i2c_adap);
>>> + bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
>>>
>>> bus->i2c_client.adapter = &bus->i2c_adap;
>>>
>>>
>>
>> -ENODESCRIPTION.
>
> Okey. Sorry for that.
>
>>
>> What are you intending with this change? AFAICT, i2c_add_bus_adapter()
>> returns 0 on success and a negative value otherwise. Why should it be
>> stored at bus->i2c_rc?
>
> My intention was to give i2c_rc its proper use.
> I looked at bttv-i2c.c and cx88-i2c.c and (perhaps wrongly) guessed
> the intended use to i2c_rc was to save i2c registration result.
>
> Without this patch, where is this bus->i2c_rc variable used?
> Unless I've missed something, to me there are two options:
> - use i2c_rc
> - remove it
If i2c_rc was never initialized, then just remove it. If it is required,
then there's a bug somewhere out there on those drivers.
IMHO, if the I2C bus doesn't register, any driver that requires I2C bus
should return -ENODEV.
It should be noticed that there are a few devices that don't need I2C bus
to work: simple video grabber cards that don't have anything on their I2C.
There are several of them at bttv, and a few at cx88 and saa7134. Maybe that's
the reason why those drivers have a var to indicate if i2c got registered.
>
> Again sorry for lack of description, I thought it was self-explaining patch.
>
> If you provide some feedback about proper solution, I can resend the
> patch series.
Thanks!
Mauro
>
> Thanks,
> Ezequiel.
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status
2012-06-25 19:49 ` Mauro Carvalho Chehab
@ 2012-06-25 20:06 ` Ezequiel Garcia
2012-06-25 20:53 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-25 20:06 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media
On Mon, Jun 25, 2012 at 4:49 PM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
>
> If i2c_rc was never initialized, then just remove it. If it is required,
> then there's a bug somewhere out there on those drivers.
>
> IMHO, if the I2C bus doesn't register, any driver that requires I2C bus
> should return -ENODEV.
Agreed.
>
> It should be noticed that there are a few devices that don't need I2C bus
> to work: simple video grabber cards that don't have anything on their I2C.
> There are several of them at bttv, and a few at cx88 and saa7134. Maybe that's
> the reason why those drivers have a var to indicate if i2c got registered.
Mmm, that would explain mysterious i2c_rc.
Anyway, I'm still a *q-bit* unsure about which drivers require i2c to
work and which don't.
I'm gonna investigate this carefully and send a v2 (probably just to
send a v3 later :)
Thanks for reviewing,
Ezequiel.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status
2012-06-25 20:06 ` Ezequiel Garcia
@ 2012-06-25 20:53 ` Mauro Carvalho Chehab
2012-06-26 16:40 ` Ezequiel Garcia
0 siblings, 1 reply; 19+ messages in thread
From: Mauro Carvalho Chehab @ 2012-06-25 20:53 UTC (permalink / raw)
To: Ezequiel Garcia; +Cc: linux-media
Em 25-06-2012 17:06, Ezequiel Garcia escreveu:
> On Mon, Jun 25, 2012 at 4:49 PM, Mauro Carvalho Chehab
> <mchehab@redhat.com> wrote:
>>
>> If i2c_rc was never initialized, then just remove it. If it is required,
>> then there's a bug somewhere out there on those drivers.
>>
>> IMHO, if the I2C bus doesn't register, any driver that requires I2C bus
>> should return -ENODEV.
>
> Agreed.
>
>>
>> It should be noticed that there are a few devices that don't need I2C bus
>> to work: simple video grabber cards that don't have anything on their I2C.
>> There are several of them at bttv, and a few at cx88 and saa7134. Maybe that's
>> the reason why those drivers have a var to indicate if i2c got registered.
>
> Mmm, that would explain mysterious i2c_rc.
>
> Anyway, I'm still a *q-bit* unsure about which drivers require i2c to
> work and which don't.
> I'm gonna investigate this carefully and send a v2 (probably just to
> send a v3 later :)
Yeah, research is needed ;) As "bttv" is the mother of the I2C code found at
other PCI drivers, as it is one of the oldest implementations, I bet you'll
find this field propagated without usage on some drivers (and probably other
unused fields as well ;) )
>
> Thanks for reviewing,
> Ezequiel.
>
Regards,
Mauro
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status
2012-06-25 20:53 ` Mauro Carvalho Chehab
@ 2012-06-26 16:40 ` Ezequiel Garcia
2012-06-26 18:23 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 19+ messages in thread
From: Ezequiel Garcia @ 2012-06-26 16:40 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media
Mauro,
On Mon, Jun 25, 2012 at 5:53 PM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
>
> Yeah, research is needed ;) As "bttv" is the mother of the I2C code found at
> other PCI drivers, as it is one of the oldest implementations, I bet you'll
> find this field propagated without usage on some drivers (and probably other
> unused fields as well ;) )
>
I did some research and it looks like this patch series should be broke in two:
- cleanup i2c_rc and i2c unused stuff
- struct i2c_algo_bit_data cleanup (already sent)
Unless there is some problem with the latter, could you pick this patches:
(i.e, the whole series except the i2c_rc part)
cx25821: Replace struct memcpy with struct assignment
cx25821: Remove useless struct i2c_algo_bit_data usage
cx231xx: Replace struct memcpy with struct assignment
cx231xx: Remove useless struct i2c_algo_bit_data usage
cx23885: Replace struct memcpy with struct assignment
cx23885: Remove useless struct i2c_algo_bit_data
saa7164: Replace struct memcpy with struct assignment
saa7164: Remove useless struct i2c_algo_bit_data
I'll fix a new patch series for i2c_rc cleaning.
Hope this is not too much trouble for you.
Thanks,
Ezequiel.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status
2012-06-26 16:40 ` Ezequiel Garcia
@ 2012-06-26 18:23 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 19+ messages in thread
From: Mauro Carvalho Chehab @ 2012-06-26 18:23 UTC (permalink / raw)
To: Ezequiel Garcia; +Cc: linux-media
Em 26-06-2012 13:40, Ezequiel Garcia escreveu:
> Mauro,
>
> On Mon, Jun 25, 2012 at 5:53 PM, Mauro Carvalho Chehab
> <mchehab@redhat.com> wrote:
>>
>> Yeah, research is needed ;) As "bttv" is the mother of the I2C code found at
>> other PCI drivers, as it is one of the oldest implementations, I bet you'll
>> find this field propagated without usage on some drivers (and probably other
>> unused fields as well ;) )
>>
>
> I did some research and it looks like this patch series should be broke in two:
> - cleanup i2c_rc and i2c unused stuff
> - struct i2c_algo_bit_data cleanup (already sent)
>
> Unless there is some problem with the latter, could you pick this patches:
> (i.e, the whole series except the i2c_rc part)
> cx25821: Replace struct memcpy with struct assignment
> cx25821: Remove useless struct i2c_algo_bit_data usage
> cx231xx: Replace struct memcpy with struct assignment
> cx231xx: Remove useless struct i2c_algo_bit_data usage
> cx23885: Replace struct memcpy with struct assignment
> cx23885: Remove useless struct i2c_algo_bit_data
> saa7164: Replace struct memcpy with struct assignment
> saa7164: Remove useless struct i2c_algo_bit_data
>
> I'll fix a new patch series for i2c_rc cleaning.
>
> Hope this is not too much trouble for you.
I prefer if you could re-send them with a proper description why
i2c_rc is needed. Only really really trivial emails may not
have descriptions ;)
> Thanks,
> Ezequiel.
>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2012-06-26 18:23 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-18 19:23 [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 02/12] saa7164: Remove useless struct i2c_algo_bit_data Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 03/12] saa7164: Replace struct memcpy with struct assignment Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 04/12] cx23885: Use i2c_rc properly to store i2c register status Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 05/12] cx23885: Remove useless struct i2c_algo_bit_data Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 06/12] cx23885: Replace struct memcpy with struct assignment Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 07/12] cx231xx: Use i2c_rc properly to store i2c register status Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 08/12] cx231xx: Remove useless struct i2c_algo_bit_data usage Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 09/12] cx231xx: Replace struct memcpy with struct assignment Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 10/12] cx25821: Use i2c_rc properly to store i2c register status Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 11/12] cx25821: Remove useless struct i2c_algo_bit_data usage Ezequiel Garcia
2012-06-18 19:23 ` [PATCH 12/12] cx25821: Replace struct memcpy with struct assignment Ezequiel Garcia
2012-06-25 19:29 ` [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status Mauro Carvalho Chehab
2012-06-25 19:42 ` Ezequiel Garcia
2012-06-25 19:49 ` Mauro Carvalho Chehab
2012-06-25 20:06 ` Ezequiel Garcia
2012-06-25 20:53 ` Mauro Carvalho Chehab
2012-06-26 16:40 ` Ezequiel Garcia
2012-06-26 18:23 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).