linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Ioana Risteiu" <Ioana.Risteiu@analog.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Ramona Nechita" <ramona.nechita@analog.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] iio: adc: update ad7779 to use IIO backend
Date: Sat, 9 Aug 2025 20:37:48 +0100	[thread overview]
Message-ID: <20250809203748.1cac382f@jic23-huawei> (raw)
In-Reply-To: <aJO8thsrIgS3YGj2@smile.fi.intel.com>


> 
> > +static int ad7779_conf_channels(struct iio_dev *indio_dev, const struct ad7779_state *st)
> > +{
> > +	struct iio_chan_spec *channels;
> > +	struct device *dev = &st->spi->dev;
> > +	int num_channels = ARRAY_SIZE(ad7779_channels);
> > +
> > +	channels = devm_kcalloc(dev, num_channels, sizeof(*channels), GFP_KERNEL);  
> 
> Doesn't sound like a right place for devm. Is this function called only at probe stage?
Yup.  So probably wants a name that doesn't sound like a runtime thing.  setup_channels maybe?

> 

  reply	other threads:[~2025-08-09 19:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06 19:24 [PATCH v2 0/3] Add IIO backend support for AD7779 Ioana Risteiu
2025-08-06 19:24 ` [PATCH v2 1/3] iio: adc: adi-axi-adc: add axi_adc_num_lanes_set Ioana Risteiu
2025-08-06 19:24 ` [PATCH v2 2/3] dt-bindings: iio: adc: add IIO backend support Ioana Risteiu
2025-08-08  6:52   ` Krzysztof Kozlowski
2025-08-06 19:25 ` [PATCH v2 3/3] iio: adc: update ad7779 to use IIO backend Ioana Risteiu
2025-08-06 20:36   ` Andy Shevchenko
2025-08-09 19:37     ` Jonathan Cameron [this message]
2025-08-09 19:48   ` Jonathan Cameron
2025-08-11  6:46   ` Dan Carpenter

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=20250809203748.1cac382f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Ioana.Risteiu@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=ramona.nechita@analog.com \
    --cc=robh@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).