On Thu, Sep 24, 2015 at 08:28:50PM +0100, Salah Triki wrote: > On Wed, Sep 23, 2015 at 11:37:37AM +0530, Sudip Mukherjee wrote: > > On Wed, Sep 23, 2015 at 03:28:07AM +0100, Salah Triki wrote: > > > dgnc_poll_tick is declared global, so dgnc_driver_pollrate_store needs to take the > > > lock dgnc_poll_lock before modifying this variable. dgnc_poll_lock is the > > > appropriate lock, since it is intended for poll scheduling and dgnc_poll_tick > > > contains the poll rate. dgnc_poll_lock needs to be declare not static and > > > extern in order to be visible for dgnc_driver_pollrate_store. > > > > > > Signed-off-by: Salah Triki <salah.triki@xxxxxxx> > > > --- > > <snip> > > > + spin_lock_irqsave(&dgnc_poll_lock, flags); > > If I remember correctly Greg asked why you are using spin_lock_irqsave()? > > > > If you need to lock why you are not using mutex here? > > > > regards > > sudip > > dgnc_poll_lock is declared spinlock_t, that's way I use spin_lock_irqsave(). I was looking at the code. Your commit message is not clear. You donot need to lock with spinlock if it is just a global variable. dgnc_poll_tick is used to detemine the timer expire value and is used in the timer handler. regards sudip _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel