linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	guenter.roeck@ericsson.com, khali@linux-fr.org,
	dmitry.torokhov@gmail.com, broonie@opensource.wolfsonmicro.com,
	gregkh@suse.de, alan@lxorguk.ukuu.org.uk, arnd@arndb.de
Subject: Re: [PATCH 1/6] IIO: Core sysfs only support.
Date: Mon, 17 Oct 2011 17:27:35 +0100	[thread overview]
Message-ID: <4E9C5777.5040904@cam.ac.uk> (raw)
In-Reply-To: <1318857381-13787-2-git-send-email-jic23@cam.ac.uk>

On 10/17/11 14:16, Jonathan Cameron wrote:
> Add support for simple sysfs only interfaces.
> 
> Bulk of patch is concerned with taking struct iio_chan_spec
> arrays and generating all the relevant interfaces from them.
Sorry all, one little rather debilitating buglet in here.
Means no attrs actually get registered.
...
> +struct iio_dev *iio_device_allocate(int sizeof_priv)
> +{
> +	struct iio_dev *dev;
> +	size_t alloc_size;
> +
> +	alloc_size = sizeof(struct iio_dev);
> +	if (sizeof_priv) {
> +		alloc_size = ALIGN(alloc_size, IIO_ALIGN);
> +		alloc_size += sizeof_priv;
> +	}
> +	/* ensure cacheline alignment of whole construct */
> +	alloc_size += IIO_ALIGN - 1;
> +
> +	dev = kzalloc(alloc_size, GFP_KERNEL);
> +
> +	if (dev) {
Following line was missing for some reason.

		dev->dev.groups = dev->groups;
> +		dev->dev.type = &iio_dev_type;
> +		dev->dev.bus = &iio_bus_type;
> +		device_initialize(&dev->dev);
> +		dev_set_drvdata(&dev->dev, (void *)dev);
> +		mutex_init(&dev->mlock);
> +	}
> +
> +	return dev;
> +}
> +EXPORT_SYMBOL_GPL(iio_device_allocate);
..

  parent reply	other threads:[~2011-10-17 16:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 13:16 [PATCH 0/6] IIO: Out of staging step 1: The core Jonathan Cameron
2011-10-17 13:16 ` [PATCH 1/6] IIO: Core sysfs only support Jonathan Cameron
2011-10-17 13:42   ` Alexander Stein
2011-10-17 13:48     ` Jonathan Cameron
2011-10-17 16:27   ` Jonathan Cameron [this message]
2011-10-17 13:16 ` [PATCH 2/6] IIO:ADC: max1363 initial import Jonathan Cameron
2011-10-17 13:16 ` [PATCH 3/6] IIO:ADC:ad799x " Jonathan Cameron
2011-10-17 13:16 ` [PATCH 4/6] IIO:light:tsl2563 initial move out of staging Jonathan Cameron
2011-10-17 13:16 ` [PATCH 5/6] IIO:imu:adis16400 partial move from staging Jonathan Cameron
2011-10-17 13:16 ` [PATCH 6/6] IIO: ABI documetation Jonathan Cameron
2011-11-07 14:52 [PATCH 0/6 V2] IIO: Out of staging step 1: The core jic23
2011-11-07 14:52 ` [PATCH 1/6] IIO: Core sysfs only support jic23
2011-11-11 10:40   ` Michael Hennerich
2012-02-01 15:20   ` Maxime Ripard

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=4E9C5777.5040904@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@suse.de \
    --cc=guenter.roeck@ericsson.com \
    --cc=khali@linux-fr.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).