linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-next: Tree for Mar 6 (staging/iio)
       [not found] <20120306180746.25c595babf8b5072366cdbec@canb.auug.org.au>
@ 2012-03-06 18:51 ` Randy Dunlap
  2012-03-06 19:43   ` [PATCH] staging:iio: Fix compile error without CONFIG_DEBUG_FS Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2012-03-06 18:51 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, LKML, Jonathan Cameron, linux-iio

On 03/05/2012 11:07 PM, Stephen Rothwell wrote:

> Hi all,
> 
> Changes since 20120305:


When CONFIG_DEBUG_FS is not enabled:

drivers/staging/iio/industrialio-core.c:621:11: error: 'iio_read_channel_ext_info' undeclared (first use in this function)
drivers/staging/iio/industrialio-core.c:623:11: error: 'iio_write_channel_ext_info' undeclared (first use in this function)




-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] staging:iio: Fix compile error without CONFIG_DEBUG_FS
  2012-03-06 18:51 ` linux-next: Tree for Mar 6 (staging/iio) Randy Dunlap
@ 2012-03-06 19:43   ` Lars-Peter Clausen
  2012-03-06 20:03     ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2012-03-06 19:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jonathan Cameron, Randy Dunlap, Stephen Rothwell,
	Michael Hennerich, linux-next, linux-kernel, linux-iio,
	Lars-Peter Clausen

commit e553f182d ("staging: iio: core: Introduce debugfs support, add support
for direct register access") added a '#if defined(CONFIG_DEBUG_FS)' around
iio_read_channel_ext_info and iio_write_channel_ext_info causing the following
compile error if CONFIG_DEBUG_FS is not defined.

	drivers/staging/iio/industrialio-core.c:621:11: error: 'iio_read_channel_ext_info' undeclared (first use in this function)
	drivers/staging/iio/industrialio-core.c:623:11: error: 'iio_write_channel_ext_info' undeclared (first use in this function)

This patch fixes the issue by moving the functions out of the '#if
defined(CONFIG_DEBUG_FS)' section again.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/industrialio-core.c |   54 +++++++++++++++---------------
 1 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 27695df..d303bfb 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -227,33 +227,6 @@ static void iio_device_unregister_debugfs(struct iio_dev *indio_dev)
 	debugfs_remove_recursive(indio_dev->debugfs_dentry);
 }
 
-static ssize_t iio_read_channel_ext_info(struct device *dev,
-				     struct device_attribute *attr,
-				     char *buf)
-{
-	struct iio_dev *indio_dev = dev_get_drvdata(dev);
-	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
-	const struct iio_chan_spec_ext_info *ext_info;
-
-	ext_info = &this_attr->c->ext_info[this_attr->address];
-
-	return ext_info->read(indio_dev, this_attr->c, buf);
-}
-
-static ssize_t iio_write_channel_ext_info(struct device *dev,
-				     struct device_attribute *attr,
-				     const char *buf,
-					 size_t len)
-{
-	struct iio_dev *indio_dev = dev_get_drvdata(dev);
-	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
-	const struct iio_chan_spec_ext_info *ext_info;
-
-	ext_info = &this_attr->c->ext_info[this_attr->address];
-
-	return ext_info->write(indio_dev, this_attr->c, buf, len);
-}
-
 static int iio_device_register_debugfs(struct iio_dev *indio_dev)
 {
 	struct dentry *d;
@@ -297,6 +270,33 @@ static void iio_device_unregister_debugfs(struct iio_dev *indio_dev)
 }
 #endif /* CONFIG_DEBUG_FS */
 
+static ssize_t iio_read_channel_ext_info(struct device *dev,
+				     struct device_attribute *attr,
+				     char *buf)
+{
+	struct iio_dev *indio_dev = dev_get_drvdata(dev);
+	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
+	const struct iio_chan_spec_ext_info *ext_info;
+
+	ext_info = &this_attr->c->ext_info[this_attr->address];
+
+	return ext_info->read(indio_dev, this_attr->c, buf);
+}
+
+static ssize_t iio_write_channel_ext_info(struct device *dev,
+				     struct device_attribute *attr,
+				     const char *buf,
+					 size_t len)
+{
+	struct iio_dev *indio_dev = dev_get_drvdata(dev);
+	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
+	const struct iio_chan_spec_ext_info *ext_info;
+
+	ext_info = &this_attr->c->ext_info[this_attr->address];
+
+	return ext_info->write(indio_dev, this_attr->c, buf, len);
+}
+
 static ssize_t iio_read_channel_info(struct device *dev,
 				     struct device_attribute *attr,
 				     char *buf)
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging:iio: Fix compile error without CONFIG_DEBUG_FS
  2012-03-06 19:43   ` [PATCH] staging:iio: Fix compile error without CONFIG_DEBUG_FS Lars-Peter Clausen
@ 2012-03-06 20:03     ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2012-03-06 20:03 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Greg Kroah-Hartman, Jonathan Cameron, Stephen Rothwell,
	Michael Hennerich, linux-next, linux-kernel, linux-iio

On 03/06/2012 11:43 AM, Lars-Peter Clausen wrote:

> commit e553f182d ("staging: iio: core: Introduce debugfs support, add support
> for direct register access") added a '#if defined(CONFIG_DEBUG_FS)' around
> iio_read_channel_ext_info and iio_write_channel_ext_info causing the following
> compile error if CONFIG_DEBUG_FS is not defined.
> 
> 	drivers/staging/iio/industrialio-core.c:621:11: error: 'iio_read_channel_ext_info' undeclared (first use in this function)
> 	drivers/staging/iio/industrialio-core.c:623:11: error: 'iio_write_channel_ext_info' undeclared (first use in this function)
> 
> This patch fixes the issue by moving the functions out of the '#if
> defined(CONFIG_DEBUG_FS)' section again.
> 
> Reported-by: Randy Dunlap <rdunlap@xenotime.net>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>


Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Thanks.


> ---
>  drivers/staging/iio/industrialio-core.c |   54 +++++++++++++++---------------
>  1 files changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
> index 27695df..d303bfb 100644
> --- a/drivers/staging/iio/industrialio-core.c
> +++ b/drivers/staging/iio/industrialio-core.c
> @@ -227,33 +227,6 @@ static void iio_device_unregister_debugfs(struct iio_dev *indio_dev)
>  	debugfs_remove_recursive(indio_dev->debugfs_dentry);
>  }
>  
> -static ssize_t iio_read_channel_ext_info(struct device *dev,
> -				     struct device_attribute *attr,
> -				     char *buf)
> -{
> -	struct iio_dev *indio_dev = dev_get_drvdata(dev);
> -	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
> -	const struct iio_chan_spec_ext_info *ext_info;
> -
> -	ext_info = &this_attr->c->ext_info[this_attr->address];
> -
> -	return ext_info->read(indio_dev, this_attr->c, buf);
> -}
> -
> -static ssize_t iio_write_channel_ext_info(struct device *dev,
> -				     struct device_attribute *attr,
> -				     const char *buf,
> -					 size_t len)
> -{
> -	struct iio_dev *indio_dev = dev_get_drvdata(dev);
> -	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
> -	const struct iio_chan_spec_ext_info *ext_info;
> -
> -	ext_info = &this_attr->c->ext_info[this_attr->address];
> -
> -	return ext_info->write(indio_dev, this_attr->c, buf, len);
> -}
> -
>  static int iio_device_register_debugfs(struct iio_dev *indio_dev)
>  {
>  	struct dentry *d;
> @@ -297,6 +270,33 @@ static void iio_device_unregister_debugfs(struct iio_dev *indio_dev)
>  }
>  #endif /* CONFIG_DEBUG_FS */
>  
> +static ssize_t iio_read_channel_ext_info(struct device *dev,
> +				     struct device_attribute *attr,
> +				     char *buf)
> +{
> +	struct iio_dev *indio_dev = dev_get_drvdata(dev);
> +	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
> +	const struct iio_chan_spec_ext_info *ext_info;
> +
> +	ext_info = &this_attr->c->ext_info[this_attr->address];
> +
> +	return ext_info->read(indio_dev, this_attr->c, buf);
> +}
> +
> +static ssize_t iio_write_channel_ext_info(struct device *dev,
> +				     struct device_attribute *attr,
> +				     const char *buf,
> +					 size_t len)
> +{
> +	struct iio_dev *indio_dev = dev_get_drvdata(dev);
> +	struct iio_dev_attr *this_attr = to_iio_dev_attr(attr);
> +	const struct iio_chan_spec_ext_info *ext_info;
> +
> +	ext_info = &this_attr->c->ext_info[this_attr->address];
> +
> +	return ext_info->write(indio_dev, this_attr->c, buf, len);
> +}
> +
>  static ssize_t iio_read_channel_info(struct device *dev,
>  				     struct device_attribute *attr,
>  				     char *buf)



-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-06 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120306180746.25c595babf8b5072366cdbec@canb.auug.org.au>
2012-03-06 18:51 ` linux-next: Tree for Mar 6 (staging/iio) Randy Dunlap
2012-03-06 19:43   ` [PATCH] staging:iio: Fix compile error without CONFIG_DEBUG_FS Lars-Peter Clausen
2012-03-06 20:03     ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).