From: Randy Dunlap <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public•gmane.org>
To: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public•gmane.org>
Cc: Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public•gmane.org>,
Jonathan Cameron <jic23-KWPb1pKIrIJaa/9Udqfwiw@public•gmane.org>,
Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public•gmane.org>,
Michael Hennerich
<michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public•gmane.org>,
linux-next-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
Subject: Re: [PATCH] staging:iio: Fix compile error without CONFIG_DEBUG_FS
Date: Tue, 06 Mar 2012 12:03:06 -0800 [thread overview]
Message-ID: <4F566D7A.1030400@xenotime.net> (raw)
In-Reply-To: <1331063025-25242-1-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
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-/UHa2rfvQTnk1uMJSBkQmQ@public•gmane.org>
> Signed-off-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public•gmane.org>
Acked-by: Randy Dunlap <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public•gmane.org>
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
next prev parent reply other threads:[~2012-03-06 20:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 7:07 linux-next: Tree for Mar 6 Stephen Rothwell
2012-03-06 18:51 ` linux-next: Tree for Mar 6 (staging/iio) Randy Dunlap
[not found] ` <4F565CB0.8070301-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
2012-03-06 19:43 ` [PATCH] staging:iio: Fix compile error without CONFIG_DEBUG_FS Lars-Peter Clausen
[not found] ` <1331063025-25242-1-git-send-email-lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2012-03-06 20:03 ` Randy Dunlap [this message]
2012-03-06 20:06 ` linux-next: Tree for Mar 6 (nfs) Randy Dunlap
[not found] ` <4F566E37.5040009-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>
2012-03-13 20:58 ` Randy Dunlap
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=4F566D7A.1030400@xenotime.net \
--to=rdunlap-/uha2rfvqtnk1umjsbkqmq@public$(echo .)gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public$(echo .)gmane.org \
--cc=jic23-KWPb1pKIrIJaa/9Udqfwiw@public$(echo .)gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public$(echo .)gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-next-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public$(echo .)gmane.org \
--cc=sfr-3FnU+UHB4dNDw9hX6IcOSA@public$(echo .)gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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