login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
5
Re: [PATCH 1/3] driver core: Add ability for arch code to setup pdev_archdata
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Kumar Gala
Subject:
Re: [PATCH 1/3] driver core: Add ability for arch code to setup pdev_archdata
Date: Thursday, August 5, 2010 - 9:14 am
On Aug 5, 2010, at 10:43 AM, Stephen Rothwell wrote:
quoted text
> Hi Kumar, > > On Thu, 5 Aug 2010 10:15:45 -0500 Kumar Gala <galak@kernel.crashing.org> wrote: >> >> --- a/drivers/base/platform.c >> +++ b/drivers/base/platform.c >> @@ -19,6 +19,7 @@ >> #include <linux/err.h> >> #include <linux/slab.h> >> #include <linux/pm_runtime.h> >> +#include <asm/platform_device.h> >> >> #include "base.h" >> >> @@ -170,6 +171,9 @@ struct platform_device *platform_device_alloc(const char *name, int id) >> pa->pdev.id = id; >> device_initialize(&pa->pdev.dev); >> pa->pdev.dev.release = platform_device_release; >> +#ifdef ARCH_HAS_PDEV_ARCHDATA_SETUP >> + arch_setup_pdev_archdata(&pa->pdev); >> +#endif >> } >> >> return pa ? &pa->pdev : NULL; >> diff --git a/include/asm-generic/platform_device.h b/include/asm-generic/platform_device.h >> new file mode 100644 >> index 0000000..64806dc >> --- /dev/null >> +++ b/include/asm-generic/platform_device.h >> @@ -0,0 +1,7 @@ >> +#ifndef __ASM_GENERIC_PLATFORM_DEVICE_H_ >> +#define __ASM_GENERIC_PLATFORM_DEVICE_H_ >> +/* >> + * an architecture can override to define arch_setup_pdev_archdata >> + */ >> + >> +#endif /* __ASM_GENERIC_PLATFORM_DEVICE_H_ */ > > Why not do: > > #include <linux/platform_device.h> > > #ifndef arch_setup_pdev_archdata > static inline void arch_setup_pdev_archdata(struct platform_device *pdev) { } > #endif > > in asm-generic/platform-device.h > > and the the call in platform_device_alloc() can be unconditional. If the arch wants to override arch_setup_pdev_archdata, it defines the function and then does > > #define arch_setup_pdev_archdata arch_setup_pdev_archdata > > before still including asm-generic/platform_device.h
I've got no issues with the style change. - k--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 1/3] driver core: Add ability for arch code to setu ...
, Kumar Gala
, (Thu Aug 5, 8:15 am)
[PATCH 2/3] powerpc: implement arch_setup_pdev_archdata
, Kumar Gala
, (Thu Aug 5, 8:15 am)
Re: [PATCH 1/3] driver core: Add ability for arch code to ...
, Stephen Rothwell
, (Thu Aug 5, 8:43 am)
Re: [PATCH 2/3] powerpc: implement arch_setup_pdev_archdata
, Stephen Rothwell
, (Thu Aug 5, 8:44 am)
Re: [PATCH 1/3] driver core: Add ability for arch code to ...
, Kumar Gala
, (Thu Aug 5, 9:14 am)
Re: [PATCH 2/3] powerpc: implement arch_setup_pdev_archdata
, Kumar Gala
, (Thu Aug 5, 9:14 am)
Re: [PATCH 1/3] driver core: Add ability for arch code to ...
, Greg KH
, (Thu Aug 5, 11:02 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Robin Lee Powell
NFS hang + umount -f: better behaviour requested.
Linus Torvalds
Linux 2.6.34-rc4
Colin Cross
[PATCH 12/21] ARM: tegra: Add suspend and hotplug support
git
:
Fredrik Kuivinen
Re: fatal: unable to create '.git/index': File exists
Wink Saville
How-to combine several separate git repos?
Emily Ren
How to pull remote branch with specified commit id?
Denis Bueno
Git clone error
pradeep singh
git-update-server-info may be required,cannot clone and pull from a remote reposit...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
frantisek holop
Re: splassert: vwakeup: and friends
linux-netdev
:
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Timo Teräs
ip xfrm policy semantics
Ron Mercer
[net-next PATCH 2/2] qlge: Version change to v1.00.00.27
Maciej W. Rozycki
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
git-commits-head
:
Linux Kernel Mailing List
powerpc/fsl_msi: enable msi allocation in all banks
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
[ARM] mmp: add dma support to mmp2
Colocation donated by:
Syndicate