Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1389507
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] i2c-mux-pca9541: fix setup_timer.cocci warnings |
| Date | 2016-04-27 21:10 +0200 |
| Message-ID | <rsD0u-6ts-15@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Use setup_timer function instead of initializing timer with the function and data fields Generated by: scripts/coccinelle/api/setup_timer.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> --- tree: git://git.code.sf.net/p/openipmi/linux-ipmi v4.5-ipmi head: 671fec027e30fdac67b341f0271841f02db0a027 commit: 4a199ab1bf7b7a2b5f7e0b0eb4162b4e98b9cd7f [25/33] i2c-mux-pca9541: Add support for non-blocking handling i2c-mux-pca9541.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/i2c/muxes/i2c-mux-pca9541.c +++ b/drivers/i2c/muxes/i2c-mux-pca9541.c @@ -547,9 +547,7 @@ static int pca9541_probe(struct i2c_clie data->op_e.smbus.data = &data->op_data; data->op_e.smbus.size = I2C_SMBUS_BYTE_DATA; - init_timer(&data->timer); - data->timer.data = (unsigned long) data; - data->timer.function = pca9541_timeout; + setup_timer(&data->timer, pca9541_timeout, (unsigned long)data); /* * I2C accesses are unprotected here.
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] i2c-mux-pca9541: fix setup_timer.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-04-27 21:10 +0200 Re: [PATCH] i2c-mux-pca9541: fix setup_timer.cocci warnings Peter Rosin <peda@axentia.se> - 2016-04-27 23:50 +0200 Re: [PATCH] i2c-mux-pca9541: fix setup_timer.cocci warnings Wolfram Sang <wsa@the-dreams.de> - 2016-05-11 17:20 +0200
csiph-web