Message ID | alpine.DEB.2.02.1604272105150.2043@localhost6.localdomain6 |
---|---|
State | Not Applicable |
Headers | show |
On 2016-04-27 21:06, Julia Lawall wrote: > 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> > Acked-by: Peter Rosin <peda@axentia.se> Cheers, Peter -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Apr 27, 2016 at 09:06:47PM +0200, Julia Lawall wrote: > 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 Why is this patch sent to the i2c-list? This patch does not apply upstream. If it is really needed to send this to the i2c list, it should be stated very clearly that this is not for upstream.
--- 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.