Skip to content

Commit

Permalink
[POWERPC] Export of_device_get_modalias
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Sylvain Munaut authored and Paul Mackerras committed May 7, 2007
1 parent d25a9d6 commit de41189
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/powerpc/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
2 changes: 2 additions & 0 deletions include/asm-powerpc/of_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit de41189

Please sign in to comment.