From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Russell King <rmk+kernel@arm.linux.org.uk>,
Greg Kroah-Hartman <gregkh@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Samuel Ortiz <sameo@linux.intel.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: platform_device_add_data(pdev, NULL, 0)
Date: Fri, 23 Oct 2009 22:26:22 +0200 [thread overview]
Message-ID: <20091023202622.GA11843@pengutronix.de> (raw)
Hello,
mfd_add_device() (defined in drivers/mfd/mfd-core.c) is a wrapper do
allocate platform_devices.
It contains:
ret = platform_device_add_data(pdev,
cell->platform_data, cell->data_size);
If cell->data_size is 0 (and so likely cell->platform_data == NULL),
still pdev->dev.platform_data get assigned ZERO_SIZE_PTR.
IMHO the result should better be that pdev->dev.platform_data ends being
NULL, too. Agreed?
If yes, where is the right place to fix that, mfd_add_device() or
platform_device_add_data()?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next reply other threads:[~2009-10-23 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 20:26 Uwe Kleine-König [this message]
2009-10-26 16:48 ` Greg KH
2009-10-26 21:19 ` Uwe Kleine-König
2009-10-26 21:21 ` Greg KH
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=20091023202622.GA11843@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=akpm@linux-foundation.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=sameo@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome