Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c13fec1 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

usb: isp1301-omap: Convert timers to use timer_setup()



In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: linux-usb@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Acked-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e4ed2b53
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1183,9 +1183,11 @@ static irqreturn_t isp1301_irq(int irq, void *isp)
	return IRQ_HANDLED;
}

static void isp1301_timer(unsigned long _isp)
static void isp1301_timer(struct timer_list *t)
{
	isp1301_defer_work((void *)_isp, WORK_TIMER);
	struct isp1301 *isp = from_timer(isp, t, timer);

	isp1301_defer_work(isp, WORK_TIMER);
}

/*-------------------------------------------------------------------------*/
@@ -1506,7 +1508,7 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
	}

	INIT_WORK(&isp->work, isp1301_work);
	setup_timer(&isp->timer, isp1301_timer, (unsigned long)isp);
	timer_setup(&isp->timer, isp1301_timer, 0);

	i2c_set_clientdata(i2c, isp);
	isp->client = i2c;