All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: michael.hennerich@analog.com
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: naming IIO_IN_DIFF in-in
Date: Tue, 07 Jun 2011 10:27:27 +0100	[thread overview]
Message-ID: <4DEDEEFF.3030600@cam.ac.uk> (raw)
In-Reply-To: <4DEDE8A2.7030803@analog.com>

On 06/07/11 10:00, Michael Hennerich wrote:
> Hi Jonathan,
>=20
> I wonder if naming IIO_IN_DIFF in-in is really a good idea.
> Declaring the attribute in a conventional fashion doesn't work.
>=20
> static IIO_DEVICE_ATTR(in-in_scale_available, S_IRUGO, \
> ad7793_show_scale_available, NULL, 0);
Yup, that's why we have IIO_DEVICE_ATTR_NAMED.

static IIO_DEVICE_ATTR_NAMED(in_m_in_scale_available, in-in_scale_avail=
able,
S_IRUGO, ad7793_show_scale_available, NULL, 0)

should give you an iio_dev_attr_in_m_in_scale_available to use in the
attribute table.  It will show up in sysfs as in-in_scale_available.

>=20
> static struct attribute *ad7793_attributes[] =3D {
> &iio_dev_attr_sampling_frequency.dev_attr.attr,
> &iio_const_attr_sampling_frequency_available.dev_attr.attr,
> &iio_dev_attr_in-in_scale_available.dev_attr.attr,
> NULL
> };
>=20
> drivers/staging/iio/adc/ad7793.c:681: error: expected =91=3D=92, =91,=
=92, =91;=92, =91asm=92 or =91__attribute__=92 before =91-=92 token
> drivers/staging/iio/adc/ad7793.c:688: error: =91iio_dev_attr_in=92 un=
declared here (not in a function)
> drivers/staging/iio/adc/ad7793.c:688: error: =91in_scale_available=92=
 undeclared here (not in a function)
>=20


  reply	other threads:[~2011-06-07  9:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07  9:00 naming IIO_IN_DIFF in-in Michael Hennerich
2011-06-07  9:27 ` Jonathan Cameron [this message]
2011-06-07 11:19   ` Hennerich, Michael

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=4DEDEEFF.3030600@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.