linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tNt.com>
To: Paul Mackerras <paulus@samba.org>
Cc: PPC dev ML <linuxppc-dev@ozlabs.org>, Sylvain Munaut <tnt@246tNt.com>
Subject: [PATCH 2/8] powerpc: export of_device_get_modalias
Date: Sun,  6 May 2007 17:38:46 +0200	[thread overview]
Message-ID: <1178465935138-git-send-email-tnt@246tNt.com> (raw)
In-Reply-To: <11784659351487-git-send-email-tnt@246tNt.com>

Apparently other parts of the kernel need to know the
modalias internally (like the sysfs code in macintosh driver).

To avoid consistency issues, we export this code and use it
everywhere it's needed rather than repeat it ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
 arch/powerpc/kernel/of_device.c |    5 +++--
 include/asm-powerpc/of_device.h |    2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 0c8ea76..38a0ef2 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -120,8 +120,8 @@ void of_device_unregister(struct of_device *ofdev)
 }
 
 
-static ssize_t of_device_get_modalias(struct of_device *ofdev,
-					char *str, ssize_t len)
+ssize_t of_device_get_modalias(struct of_device *ofdev,
+				char *str, ssize_t len)
 {
 	const char *compat;
 	int cplen, i;
@@ -239,3 +239,4 @@ EXPORT_SYMBOL(of_dev_get);
 EXPORT_SYMBOL(of_dev_put);
 EXPORT_SYMBOL(of_release_dev);
 EXPORT_SYMBOL(of_device_uevent);
+EXPORT_SYMBOL(of_device_get_modalias);
diff --git a/include/asm-powerpc/of_device.h b/include/asm-powerpc/of_device.h
index 4f1aabe..e9af49e 100644
--- a/include/asm-powerpc/of_device.h
+++ b/include/asm-powerpc/of_device.h
@@ -32,6 +32,8 @@ extern int of_device_register(struct of_device *ofdev);
 extern void of_device_unregister(struct of_device *ofdev);
 extern void of_release_dev(struct device *dev);
 
+extern ssize_t of_device_get_modalias(struct of_device *ofdev,
+					char *str, ssize_t len);
 extern int of_device_uevent(struct device *dev,
 	char **envp, int num_envp, char *buffer, int buffer_size);
 
-- 
1.5.1.2

  reply	other threads:[~2007-05-06 15:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-06 15:38 macio modalias & mpc52xx related patches for 2.6.22 Sylvain Munaut
2007-05-06 15:38 ` [PATCH 1/8] powerpc: Fix the MODALIAS generation in modpost for of devices Sylvain Munaut
2007-05-06 15:38   ` Sylvain Munaut [this message]
2007-05-06 15:38     ` [PATCH 3/8] macintosh: Use common modalias generation for macio_sysfs Sylvain Munaut
2007-05-06 15:38       ` [PATCH 4/8] powerpc: lite5200(b) dts fixes Sylvain Munaut
2007-05-06 15:38         ` [PATCH 5/8] powerpc: lite5200(b) support for i2c Sylvain Munaut
2007-05-06 15:38           ` [PATCH 6/8] powerpc: Set efika's device_type to "soc" Sylvain Munaut
2007-05-06 15:38             ` [PATCH 7/8] serial/powerpc: Don't shutdown TX on mpc5200 serial port if it is a console Sylvain Munaut
2007-05-06 15:38               ` [PATCH 8/8] powerpc: mpc52xx suspend to deep-sleep Sylvain Munaut
2007-05-07  9:09   ` [PATCH 1/8] powerpc: Fix the MODALIAS generation in modpost for of devices Johannes Berg

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=1178465935138-git-send-email-tnt@246tNt.com \
    --to=tnt@246tnt.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /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;
as well as URLs for NNTP newsgroup(s).