Thread (14 messages) 14 messages, 4 authors, 2011-07-08

Re: [PATCH v3 1/3] driver core: Add ability for arch code to setup pdev_archdata

flat view

From: Kumar Gala <hidden>
Date: 2011-07-08 04:03:54
Also in: lkml

On Jul 7, 2011, at 9:11 AM, Greg KH wrote:
On Thu, Jul 07, 2011 at 08:55:44AM -0500, Kumar Gala wrote:
quoted
=20
On Jul 1, 2011, at 5:09 PM, Greg KH wrote:
=20
quoted
On Thu, Jun 23, 2011 at 06:33:57AM -0500, Kumar Gala wrote:
quoted
On some architectures we need to setup pdev_archdata before we add =
the
quoted
quoted
quoted
device.  Waiting til a bus_notifier is too late since we might need =
the
quoted
quoted
quoted
pdev_archdata in the bus notifier.  One example is setting up of =
dma_mask
quoted
quoted
quoted
pointers such that it can be used in a bus_notifier.
=20
We add noop version of arch_setup_pdev_archdata() in
<asm-generic/platform_device.h> and allow the arch code to override =
with
quoted
quoted
quoted
access the full definitions of struct device, struct =
platform_device, and
quoted
quoted
quoted
struct pdev_archdata.
=20
Isn't there some way to use "weak" symbols to keep us from having to
create this .h file in every single arch and then if the arch wants =
to
quoted
quoted
define it, it does so?
=20
That should make this patch simpler, right?
=20
thanks,
=20
greg k-h
=20
Changing to weak should be doable if we are ok with the additional
function call always happening.
=20
Given that this is not a fast path, and the function call for the
"normal" case would do nothing, it should be fine, right?
=20
greg k-h
Sounds good, new version sent that uses weak instead.  If this looks =
good let me know if you just want to ACK and send via powerpc.git tree =
or if you'll pick these up.

- k
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help