public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-kernel@vger.kernel.org,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: platform_device_add_data(pdev, NULL, 0)
Date: Mon, 26 Oct 2009 09:48:07 -0700	[thread overview]
Message-ID: <20091026164807.GC28072@suse.de> (raw)
In-Reply-To: <20091023202622.GA11843@pengutronix.de>

On Fri, Oct 23, 2009 at 10:26:22PM +0200, Uwe Kleine-König wrote:
> 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?

Why?  Is this causing problems somewhere?

thanks,

greg k-h

  reply	other threads:[~2009-10-26 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 20:26 platform_device_add_data(pdev, NULL, 0) Uwe Kleine-König
2009-10-26 16:48 ` Greg KH [this message]
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=20091026164807.GC28072@suse.de \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=sameo@linux.intel.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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