[PATCH 3/4] staging:iio: Add missing event code extract macros
Dan Carpenter
dan.carpenter at oracle.com
Fri Feb 10 20:47:40 UTC 2012
On Fri, Feb 10, 2012 at 11:45:31PM +0300, Dan Carpenter wrote:
> On Fri, Feb 10, 2012 at 07:15:00PM +0100, Lars-Peter Clausen wrote:
> > Add macros for extracting whether the event is for a differential channel and
> > the second channel number from the event code. These were the only two fields
> > which did not have such an macro yet.
> >
> > Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
> > Acked-by: Jonathan Cameron <jic23 at kernel.org>
> > ---
> > drivers/staging/iio/events.h | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/staging/iio/events.h b/drivers/staging/iio/events.h
> > index 416800e..c25f0e3 100644
> > --- a/drivers/staging/iio/events.h
> > +++ b/drivers/staging/iio/events.h
> > @@ -97,7 +97,9 @@ enum iio_event_direction {
> > /* Event code number extraction depends on which type of event we have.
> > * Perhaps review this function in the future*/
> > #define IIO_EVENT_CODE_EXTRACT_CHAN(mask) ((__s16)(mask & 0xFFFF))
> > +#define IIO_EVENT_CODE_EXTRACT_CHAN2(mask) ((__s16)(((mask) >> 16) & 0xFFFF))
> >
> > #define IIO_EVENT_CODE_EXTRACT_MODIFIER(mask) ((mask >> 40) & 0xFF)
> > +#define IIO_EVENT_CODE_EXTRACT_DIFF(mask) (((mask) >> 55) & 0x1)
> >
>
> Breaks the build.
>
Oops. This isn't a rename. It doesn't break the build. Why are
we adding macros which nobody uses?
regards,
dan carpenter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20120210/f77a3555/attachment.asc>
More information about the devel
mailing list