[PATCH] staging: comedi: 8255: prefer using the BIT macro

Ian Abbott abbotti at mev.co.uk
Mon Oct 5 15:00:20 UTC 2015


On 01/10/15 19:05, H Hartley Sweeten wrote:
> Fix the checkpatch.pl issues.
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> ---
>   drivers/staging/comedi/drivers/8255.h | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/8255.h b/drivers/staging/comedi/drivers/8255.h
> index 41823de..55a67af 100644
> --- a/drivers/staging/comedi/drivers/8255.h
> +++ b/drivers/staging/comedi/drivers/8255.h
> @@ -25,13 +25,13 @@
>   #define I8255_DATA_B_REG	0x01
>   #define I8255_DATA_C_REG	0x02
>   #define I8255_CTRL_REG		0x03
> -#define I8255_CTRL_C_LO_IO	(1 << 0)
> -#define I8255_CTRL_B_IO		(1 << 1)
> -#define I8255_CTRL_B_MODE	(1 << 2)
> -#define I8255_CTRL_C_HI_IO	(1 << 3)
> -#define I8255_CTRL_A_IO		(1 << 4)
> +#define I8255_CTRL_C_LO_IO	BIT(0)
> +#define I8255_CTRL_B_IO		BIT(1)
> +#define I8255_CTRL_B_MODE	BIT(2)
> +#define I8255_CTRL_C_HI_IO	BIT(3)
> +#define I8255_CTRL_A_IO		BIT(4)
>   #define I8255_CTRL_A_MODE(x)	((x) << 5)
> -#define I8255_CTRL_CW		(1 << 7)
> +#define I8255_CTRL_CW		BIT(7)
>
>   struct comedi_device;
>   struct comedi_subdevice;
>

Reviewed-by: Ian Abbott <abbotti at mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-


More information about the devel mailing list