i2c: kona: Resolve Kona I2C driver issue

Message ID 1401132809-18486-1-git-send-email-srae@broadcom.com
State Accepted
Commit 6736ec15c518d013263fa97fc48ca22a50753792
Headers show

Commit Message

Steve Rae May 26, 2014, 7:33 p.m.
- "i2c mw" command hangs (with some compilers)

Signed-off-by: Steve Rae <srae@broadcom.com>
---

 drivers/i2c/kona_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve Rae June 11, 2014, 8 p.m. | #1
On 14-05-26 12:33 PM, Steve Rae wrote:
> - "i2c mw" command hangs (with some compilers)
>
> Signed-off-by: Steve Rae <srae@broadcom.com>
> ---
>
>   drivers/i2c/kona_i2c.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
> index 0b1715a..5eab338 100644
> --- a/drivers/i2c/kona_i2c.c
> +++ b/drivers/i2c/kona_i2c.c
> @@ -663,7 +663,7 @@ static int kona_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
>   static int kona_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
>   			  int alen, uchar *buffer, int len)
>   {
> -	struct i2c_msg msg[0];
> +	struct i2c_msg msg[1];
>   	unsigned char msgbuf0[64];
>   	unsigned int i;
>   	struct bcm_kona_i2c_dev *dev = kona_get_dev(adap);
>

I am hoping to get this into v2014.07

Thanks in advance, Steve

Patch

diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
index 0b1715a..5eab338 100644
--- a/drivers/i2c/kona_i2c.c
+++ b/drivers/i2c/kona_i2c.c
@@ -663,7 +663,7 @@  static int kona_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
 static int kona_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
 			  int alen, uchar *buffer, int len)
 {
-	struct i2c_msg msg[0];
+	struct i2c_msg msg[1];
 	unsigned char msgbuf0[64];
 	unsigned int i;
 	struct bcm_kona_i2c_dev *dev = kona_get_dev(adap);