Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Denis CIOCCA <denis.ciocca@st.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH] iio: Fix build error seen if IIO_TRIGGER is defined but IIO_BUFFER is not
Date: Sat, 02 Mar 2013 16:32:43 +0000	[thread overview]
Message-ID: <513229AB.90700@kernel.org> (raw)
In-Reply-To: <5130D43E.4010800@st.com>

On 03/01/2013 04:15 PM, Denis CIOCCA wrote:
> Ok Thanks.
> 
> Acked-by: Denis Ciocca <denis.ciocca@st.com>
Applied to fixes-togreg branch of iio.git

Thanks,
> 
> 
> Denis
> 
> 
> On 03/01/2013 04:57 PM, Guenter Roeck wrote:
>> If CONFIG_IIO_TRIGGER is defined but CONFIG_IIO_BUFFER is not, the following
>> build error is seen.
>>
>> drivers/iio/common/st_sensors/st_sensors_trigger.c:21:5: error:
>> redefinition of ‘st_sensors_allocate_trigger’
>> In file included from
>> drivers/iio/common/st_sensors/st_sensors_trigger.c:18:0:
>> include/linux/iio/common/st_sensors.h:239:19: note: previous
>> definition of ‘st_sensors_allocate_trigger’ was here
>> drivers/iio/common/st_sensors/st_sensors_trigger.c:65:6: error:
>> redefinition of ‘st_sensors_deallocate_trigger’
>> In file included from
>> drivers/iio/common/st_sensors/st_sensors_trigger.c:18:0:
>> include/linux/iio/common/st_sensors.h:244:20: note: previous
>> definition of ‘st_sensors_deallocate_trigger’ was here
>>
>> This occurs because st_sensors_deallocate_trigger is built if CONFIG_IIO_TRIGGER
>> is defined, but the dummy function is compiled if CONFIG_IIO_BUFFER is defined.
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   include/linux/iio/common/st_sensors.h |    9 ++++++---
>>   1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
>> index 1f86a97..8bd12be 100644
>> --- a/include/linux/iio/common/st_sensors.h
>> +++ b/include/linux/iio/common/st_sensors.h
>> @@ -227,14 +227,17 @@ struct st_sensor_data {
>>   };
>>
>>   #ifdef CONFIG_IIO_BUFFER
>> +irqreturn_t st_sensors_trigger_handler(int irq, void *p);
>> +
>> +int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf);
>> +#endif
>> +
>> +#ifdef CONFIG_IIO_TRIGGER
>>   int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
>>   				const struct iio_trigger_ops *trigger_ops);
>>
>>   void st_sensors_deallocate_trigger(struct iio_dev *indio_dev);
>>
>> -irqreturn_t st_sensors_trigger_handler(int irq, void *p);
>> -
>> -int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf);
>>   #else
>>   static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
>>   				const struct iio_trigger_ops *trigger_ops)
>>
> 

      reply	other threads:[~2013-03-02 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 15:57 [PATCH] iio: Fix build error seen if IIO_TRIGGER is defined but IIO_BUFFER is not Guenter Roeck
2013-03-01 16:15 ` Denis CIOCCA
2013-03-02 16:32   ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513229AB.90700@kernel.org \
    --to=jic23@kernel.org \
    --cc=denis.ciocca@st.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox