diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-29 12:19:30 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-19 00:39:36 -0400 |
| commit | c5f5849bffb36478dd8a1e350860ff18b654bc44 (patch) | |
| tree | d66fe98e4a097f901b2d98989c30f11f7f7a5386 | |
| parent | 60d599133011eaca6073696f6a86cd516854d547 (diff) | |
of: Remove unused of_find_device_by_phandle()
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| -rw-r--r-- | arch/microblaze/include/asm/of_platform.h | 2 | ||||
| -rw-r--r-- | arch/microblaze/kernel/of_platform.c | 18 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/of_platform.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/of_platform.c | 19 |
4 files changed, 0 insertions, 41 deletions
diff --git a/arch/microblaze/include/asm/of_platform.h b/arch/microblaze/include/asm/of_platform.h index 625003f70888..353d8f651e30 100644 --- a/arch/microblaze/include/asm/of_platform.h +++ b/arch/microblaze/include/asm/of_platform.h | |||
| @@ -14,8 +14,6 @@ | |||
| 14 | /* This is just here during the transition */ | 14 | /* This is just here during the transition */ |
| 15 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
| 16 | 16 | ||
| 17 | extern struct of_device *of_find_device_by_phandle(phandle ph); | ||
| 18 | |||
| 19 | extern void of_instantiate_rtc(void); | 17 | extern void of_instantiate_rtc(void); |
| 20 | 18 | ||
| 21 | #endif /* _ASM_MICROBLAZE_OF_PLATFORM_H */ | 19 | #endif /* _ASM_MICROBLAZE_OF_PLATFORM_H */ |
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c index a07abdd6859b..da79edf45420 100644 --- a/arch/microblaze/kernel/of_platform.c +++ b/arch/microblaze/kernel/of_platform.c | |||
| @@ -75,21 +75,3 @@ struct of_device *of_find_device_by_node(struct device_node *np) | |||
| 75 | return NULL; | 75 | return NULL; |
| 76 | } | 76 | } |
| 77 | EXPORT_SYMBOL(of_find_device_by_node); | 77 | EXPORT_SYMBOL(of_find_device_by_node); |
| 78 | |||
| 79 | static int of_dev_phandle_match(struct device *dev, void *data) | ||
| 80 | { | ||
| 81 | phandle *ph = data; | ||
| 82 | return to_of_device(dev)->dev.of_node->phandle == *ph; | ||
| 83 | } | ||
| 84 | |||
| 85 | struct of_device *of_find_device_by_phandle(phandle ph) | ||
| 86 | { | ||
| 87 | struct device *dev; | ||
| 88 | |||
| 89 | dev = bus_find_device(&of_platform_bus_type, | ||
| 90 | NULL, &ph, of_dev_phandle_match); | ||
| 91 | if (dev) | ||
| 92 | return to_of_device(dev); | ||
| 93 | return NULL; | ||
| 94 | } | ||
| 95 | EXPORT_SYMBOL(of_find_device_by_phandle); | ||
diff --git a/arch/powerpc/include/asm/of_platform.h b/arch/powerpc/include/asm/of_platform.h index b37d2dcddb97..d506aa61db83 100644 --- a/arch/powerpc/include/asm/of_platform.h +++ b/arch/powerpc/include/asm/of_platform.h | |||
| @@ -11,8 +11,6 @@ | |||
| 11 | * | 11 | * |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | extern struct of_device *of_find_device_by_phandle(phandle ph); | ||
| 15 | |||
| 16 | extern void of_instantiate_rtc(void); | 14 | extern void of_instantiate_rtc(void); |
| 17 | 15 | ||
| 18 | #endif /* _ASM_POWERPC_OF_PLATFORM_H */ | 16 | #endif /* _ASM_POWERPC_OF_PLATFORM_H */ |
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 0b5cc6d892a7..4e0a2f7c1dd3 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
| @@ -81,25 +81,6 @@ struct of_device *of_find_device_by_node(struct device_node *np) | |||
| 81 | } | 81 | } |
| 82 | EXPORT_SYMBOL(of_find_device_by_node); | 82 | EXPORT_SYMBOL(of_find_device_by_node); |
| 83 | 83 | ||
| 84 | static int of_dev_phandle_match(struct device *dev, void *data) | ||
| 85 | { | ||
| 86 | phandle *ph = data; | ||
| 87 | return to_of_device(dev)->dev.of_node->phandle == *ph; | ||
| 88 | } | ||
| 89 | |||
| 90 | struct of_device *of_find_device_by_phandle(phandle ph) | ||
| 91 | { | ||
| 92 | struct device *dev; | ||
| 93 | |||
| 94 | dev = bus_find_device(&of_platform_bus_type, | ||
| 95 | NULL, &ph, of_dev_phandle_match); | ||
| 96 | if (dev) | ||
| 97 | return to_of_device(dev); | ||
| 98 | return NULL; | ||
| 99 | } | ||
| 100 | EXPORT_SYMBOL(of_find_device_by_phandle); | ||
| 101 | |||
| 102 | |||
| 103 | #ifdef CONFIG_PPC_OF_PLATFORM_PCI | 84 | #ifdef CONFIG_PPC_OF_PLATFORM_PCI |
| 104 | 85 | ||
| 105 | /* The probing of PCI controllers from of_platform is currently | 86 | /* The probing of PCI controllers from of_platform is currently |
