Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[I2C] i2c-mv64xxx: Don't set i2c_adapter.retries

I2C adapter drivers are supposed to handle retries on nack by themselves
if they do, so there's no point in setting .retries if they don't.

As this retry mechanism is going away (at least in its current form),
clean this up now so that we don't get build failures later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mark A. Greer <mgreer@mvista.com>

authored by

Jean Delvare and committed by
Russell King
2f0a8df4 a0832798

-9
-6
arch/powerpc/sysdev/mv64x60_dev.c
··· 361 361 else 362 362 pdata.timeout = 1000; /* 1 second */ 363 363 364 - prop = of_get_property(np, "retries", NULL); 365 - if (prop) 366 - pdata.retries = *prop; 367 - else 368 - pdata.retries = 1; 369 - 370 364 pdev = platform_device_alloc(MV64XXX_I2C_CTLR_NAME, id); 371 365 if (!pdev) 372 366 return -ENOMEM;
-1
arch/ppc/syslib/mv64x60.c
··· 411 411 .freq_m = 8, 412 412 .freq_n = 3, 413 413 .timeout = 1000, /* Default timeout of 1 second */ 414 - .retries = 1, 415 414 }; 416 415 417 416 static struct resource mv64xxx_i2c_resources[] = {
-1
drivers/i2c/busses/i2c-mv64xxx.c
··· 532 532 drv_data->adapter.owner = THIS_MODULE; 533 533 drv_data->adapter.class = I2C_CLASS_HWMON; 534 534 drv_data->adapter.timeout = pdata->timeout; 535 - drv_data->adapter.retries = pdata->retries; 536 535 drv_data->adapter.nr = pd->id; 537 536 platform_set_drvdata(pd, drv_data); 538 537 i2c_set_adapdata(&drv_data->adapter, drv_data);
-1
include/linux/mv643xx_i2c.h
··· 17 17 u32 freq_m; 18 18 u32 freq_n; 19 19 u32 timeout; /* In milliseconds */ 20 - u32 retries; 21 20 }; 22 21 23 22 #endif /*_MV64XXX_I2C_H_*/