* [PATCH] of/device: Make of_device_make_bus_id() usable by other code.
@ 2010-07-24 16:01 Grant Likely
2010-07-25 3:34 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2010-07-24 16:01 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
The AMBA bus should also use of_device_make_bus_id() when populating device
out of device tree data. This patch makes the function non-static, and
adds a suitable prototype in of_device.h
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
drivers/of/platform.c | 2 +-
include/linux/of_device.h | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 94fa719..600d77f 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -508,7 +508,7 @@ EXPORT_SYMBOL(of_unregister_driver);
* value to derive a unique name. As a last resort it will use the node
* name followed by a unique number.
*/
-static void of_device_make_bus_id(struct device *dev)
+void of_device_make_bus_id(struct device *dev)
{
static atomic_t bus_no_reg_magic;
struct device_node *node = dev->of_node;
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index e11a0be..249bc11 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -27,6 +27,9 @@
extern const struct of_device_id *of_match_device(
const struct of_device_id *matches, const struct device *dev);
+#if !defined(CONFIG_SPARC)
+extern void of_device_make_bus_id(struct device *dev);
+#endif
/**
* of_driver_match_device - Tell if a driver's of_match_table matches a device.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] of/device: Make of_device_make_bus_id() usable by other code.
2010-07-24 16:01 [PATCH] of/device: Make of_device_make_bus_id() usable by other code Grant Likely
@ 2010-07-25 3:34 ` Stephen Rothwell
[not found] ` <20100725133430.4c1d38a3.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2010-07-25 3:34 UTC (permalink / raw)
To: Grant Likely
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1.1: Type: text/plain, Size: 779 bytes --]
Hi Grant,
On Sat, 24 Jul 2010 10:01:11 -0600 Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> wrote:
>
> diff --git a/include/linux/of_device.h b/include/linux/of_device.h
> index e11a0be..249bc11 100644
> --- a/include/linux/of_device.h
> +++ b/include/linux/of_device.h
> @@ -27,6 +27,9 @@
>
> extern const struct of_device_id *of_match_device(
> const struct of_device_id *matches, const struct device *dev);
> +#if !defined(CONFIG_SPARC)
> +extern void of_device_make_bus_id(struct device *dev);
> +#endif
You don't really need the protection here - it does not clash with
anything on SPARC, right?
--
Cheers,
Stephen Rothwell sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/
[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] of/device: Make of_device_make_bus_id() usable by other code.
[not found] ` <20100725133430.4c1d38a3.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
@ 2010-07-25 21:23 ` Grant Likely
0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2010-07-25 21:23 UTC (permalink / raw)
To: Stephen Rothwell
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Sat, Jul 24, 2010 at 9:34 PM, Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org> wrote:
> Hi Grant,
>
> On Sat, 24 Jul 2010 10:01:11 -0600 Grant Likely <grant.likely@secretlab.ca> wrote:
>>
>> diff --git a/include/linux/of_device.h b/include/linux/of_device.h
>> index e11a0be..249bc11 100644
>> --- a/include/linux/of_device.h
>> +++ b/include/linux/of_device.h
>> @@ -27,6 +27,9 @@
>>
>> extern const struct of_device_id *of_match_device(
>> const struct of_device_id *matches, const struct device *dev);
>> +#if !defined(CONFIG_SPARC)
>> +extern void of_device_make_bus_id(struct device *dev);
>> +#endif
>
> You don't really need the protection here - it does not clash with
> anything on SPARC, right?
No, it doesn't conflict with anything. I'll drop the if !defined() wrapper.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-25 21:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-24 16:01 [PATCH] of/device: Make of_device_make_bus_id() usable by other code Grant Likely
2010-07-25 3:34 ` Stephen Rothwell
[not found] ` <20100725133430.4c1d38a3.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2010-07-25 21:23 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox