Re: [PATCH] input: lis3dh: Add driver for lis3dh accelerometer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 20, 2011 at 11:26:00AM +0100, Jonathan Cameron wrote:
> > +
> > +enum lis3dh_interrupt_mode {
> > +	LIS3DH_OR_COMBINATION = 0x00,
> > +	LIS3DH_6D_MOVEMENT = 0x40,
> > +	LIS3DH_AND_COMBINATION = 0x80,
> > +	LIS3DH_6D_POSITION = 0xc0,
> > +};
> Enums seem silly when you don't have at least
> vaguely consecutive values.  Why not just use defines?

Actually enums are not quite silly as compiler can warn you if you
handle all possible cases in a switch() statement.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux