From: H Hartley Sweeten Date: Tue, 3 May 2016 19:29:59 +0000 (-0700) Subject: staging: comedi: das16m1: init local variables when declared X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b31cf3126474e71192282c97ae88a6f60b17bea0;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: das16m1: init local variables when declared For aesthetics, init the comedi_subdevice, comedi_async, and comedi_cmd pointers when the local variables are declared. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c index 3a62f5adfc57..d4b1b92cb112 100644 --- a/drivers/staging/comedi/drivers/das16m1.c +++ b/drivers/staging/comedi/drivers/das16m1.c @@ -373,16 +373,12 @@ static int das16m1_do_insn_bits(struct comedi_device *dev, static void das16m1_handler(struct comedi_device *dev, unsigned int status) { struct das16m1_private_struct *devpriv = dev->private; - struct comedi_subdevice *s; - struct comedi_async *async; - struct comedi_cmd *cmd; + struct comedi_subdevice *s = dev->read_subdev; + struct comedi_async *async = s->async; + struct comedi_cmd *cmd = &async->cmd; u16 num_samples; u16 hw_counter; - s = dev->read_subdev; - async = s->async; - cmd = &async->cmd; - /* figure out how many samples are in fifo */ hw_counter = comedi_8254_read(devpriv->counter, 1); /*