From: Arnd Bergmann <arnd@arndb.de>
To: Marek Belisko <marek@goldelico.com>
Cc: gregkh@linuxfoundation.org, neilb@suse.de, hns@goldelico.com,
rob.herring@calxeda.com, pawel.moll@arm.com,
mark.rutland@arm.com, swarren@wwwdotorg.org,
ijc+devicetree@hellion.org.uk, rob@landley.net,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] misc: bmp085: Add DT bindings for EOC gpio line and direct irq.
Date: Fri, 15 Nov 2013 14:56:19 +0100 [thread overview]
Message-ID: <201311151456.19585.arnd@arndb.de> (raw)
In-Reply-To: <1384465609-26485-3-git-send-email-marek@goldelico.com>
On Thursday 14 November 2013, Marek Belisko wrote:
> + if (node && !pdata) {
> + pdata = devm_kzalloc(dev, sizeof(struct bmp085_platform_data),
> + GFP_KERNEL);
> + if (!pdata)
> + return -ENOMEM;
> + }
> +
I generally recommend against allocating platform data from inside the driver,
as this requires more code and more memory than just adding fields to the
driver-specific data structure and copying over the fields from either
DT or the supplied platform data, depending on which one is used.
Arnd
next prev parent reply other threads:[~2013-11-15 13:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 21:46 [PATCH 0/3] Add EOC handling for bmp085 + DT and platform data updates Marek Belisko
2013-11-14 21:46 ` [PATCH 1/3] misc: bmp085: Clean up and enable use of interrupt for completion Marek Belisko
2013-11-14 21:46 ` [PATCH 2/3] misc: bmp085: Add DT bindings for EOC gpio line and direct irq Marek Belisko
2013-11-15 13:56 ` Arnd Bergmann [this message]
2013-11-15 15:30 ` Mark Rutland
2013-11-15 18:47 ` Arnd Bergmann
2013-11-18 8:58 ` Belisko Marek
2013-11-18 11:38 ` Arnd Bergmann
2013-11-14 21:46 ` [PATCH 3/3] misc: bmp085: Add missing platform data Marek Belisko
2013-11-15 13:58 ` Arnd Bergmann
2013-11-16 8:23 ` Dr. H. Nikolaus Schaller
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=201311151456.19585.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hns@goldelico.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek@goldelico.com \
--cc=mark.rutland@arm.com \
--cc=neilb@suse.de \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=swarren@wwwdotorg.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