From b31cf3126474e71192282c97ae88a6f60b17bea0 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 3 May 2016 12:29:59 -0700 Subject: [PATCH] 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 --- drivers/staging/comedi/drivers/das16m1.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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); /* -- 2.20.1