From 34e06079176fef4a502435d3dc50c4284d03ff05 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 18 Jul 2008 18:59:12 +0100 Subject: [PATCH] --- yaml --- r: 104935 b: refs/heads/master c: 9dadae686fce02a02982fc9c0563f6b917217a66 h: refs/heads/master i: 104933: d0f4641173698d5c9e34073a7490b66c07c613fb 104931: 63a72d6f165b44457aeb52aa6e1f71cf21ec861b 104927: abbb87048b763fd3d2181ee19a1879cf05807a40 v: v3 --- [refs] | 2 +- trunk/drivers/net/sfc/falcon.c | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index e644dd7085be..7b28145931c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 81250297d85b26eb4e9de5decf752dce430277f9 +refs/heads/master: 9dadae686fce02a02982fc9c0563f6b917217a66 diff --git a/trunk/drivers/net/sfc/falcon.c b/trunk/drivers/net/sfc/falcon.c index 630406e142e5..9138ee5b7b7b 100644 --- a/trunk/drivers/net/sfc/falcon.c +++ b/trunk/drivers/net/sfc/falcon.c @@ -223,13 +223,8 @@ static struct i2c_algo_bit_data falcon_i2c_bit_operations = { .getsda = falcon_getsda, .getscl = falcon_getscl, .udelay = 5, - /* - * This is the number of system clock ticks after which - * i2c-algo-bit gives up waiting for SCL to become high. - * It must be at least 2 since the first tick can happen - * immediately after it starts waiting. - */ - .timeout = 2, + /* Wait up to 50 ms for slave to let us pull SCL high */ + .timeout = DIV_ROUND_UP(HZ, 20), }; /************************************************************************** @@ -2479,12 +2474,11 @@ int falcon_probe_nic(struct efx_nic *efx) /* Initialise I2C adapter */ efx->i2c_adap.owner = THIS_MODULE; - efx->i2c_adap.class = I2C_CLASS_HWMON; nic_data->i2c_data = falcon_i2c_bit_operations; nic_data->i2c_data.data = efx; efx->i2c_adap.algo_data = &nic_data->i2c_data; efx->i2c_adap.dev.parent = &efx->pci_dev->dev; - strcpy(efx->i2c_adap.name, "SFC4000 GPIO"); + strlcpy(efx->i2c_adap.name, "SFC4000 GPIO", sizeof(efx->i2c_adap.name)); rc = i2c_bit_add_bus(&efx->i2c_adap); if (rc) goto fail5;