From: Ian Abbott Date: Fri, 18 Oct 2013 13:40:50 +0000 (+0100) Subject: staging: comedi: s626: specify bitshift for encoder A clock source X-Git-Tag: v3.13-rc1~170^2~175 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=2e179e428ce47c3988eead1944b5043de07731ae;p=linux.git staging: comedi: s626: specify bitshift for encoder A clock source When setting the clock source for one of the 'A' encoders to operate in "counter" mode in `s626_set_mode_a()`, bitshift the clock source value by `S626_CRABIT_CLKSRC_A` for consistency with the other modes. This has no effect on the value since `S626_CRABIT_CLKSRC_A` is 0. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index dd138a095624..770c1d5065c9 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -864,7 +864,7 @@ static void s626_set_mode_a(struct comedi_device *dev, break; default: /* Counter Mode: */ /* Select ENC_C and ENC_D as clock/direction inputs. */ - cra |= S626_CLKSRC_COUNTER; + cra |= S626_CLKSRC_COUNTER << S626_CRABIT_CLKSRC_A; /* Clock polarity is passed through. */ cra |= (setup & S626_STDMSK_CLKPOL) << (S626_CRABIT_CLKPOL_A - S626_STDBIT_CLKPOL);